I forced LCZero to play the same opening 5 times and after it lost the first two games I gave it to analyze and when it play from the 3rd game on it avoided playing the same losing moves which made it to lose against Stockfish and it won game 3, 4 and 5.
PS: I was wondering if ab engines have this capability that after it analyze the games that it lost it avoid making the same losing move again.?
The advantages of NN Learning engines..........
Moderators: hgm, Rebel, chrisw
-
- Posts: 5582
- Joined: Wed Sep 05, 2018 2:16 am
- Location: Moving
- Full name: Jorge Picado
The advantages of NN Learning engines..........
Do NOT worry and be happy, we all live a short life
-
- Posts: 570
- Joined: Mon Jul 20, 2015 5:06 pm
Re: The advantages of NN Learning engines..........
Yes. It is called an opening book. Polyglot is the most common book, but other engines such as Crafty have their own book. Bob Hyatt experimented with other learning files, but I do not know how successful they were.Chessqueen wrote: ↑Tue Aug 20, 2019 2:34 pm I forced LCZero to play the same opening 5 times and after it lost the first two games I gave it to analyze and when it play from the 3rd game on it avoided playing the same losing moves which made it to lose against Stockfish and it won game 3, 4 and 5.
PS: I was wondering if ab engines have this capability that after it analyze the games that it lost it avoid making the same losing move again.?
-
- Posts: 106
- Joined: Tue Feb 07, 2012 11:14 am
Re: The advantages of NN Learning engines..........
1. I always thought NN Engines only learn in training and not in game play or analyzing mode.Chessqueen wrote: ↑Tue Aug 20, 2019 2:34 pm I forced LCZero to play the same opening 5 times and after it lost the first two games I gave it to analyze and when it play from the 3rd game on it avoided playing the same losing moves which made it to lose against Stockfish and it won game 3, 4 and 5.
PS: I was wondering if ab engines have this capability that after it analyze the games that it lost it avoid making the same losing move again.?
2. How does the NN Engine know which move loses? Or it was just a suboptimal one.
-
- Posts: 6442
- Joined: Tue Jan 09, 2007 12:31 am
- Location: PA USA
- Full name: Louis Zulli
Re: The advantages of NN Learning engines..........
I believe you are correct. I don't believe any version of Lc0 alters a weights file or creates a "learning file". But I'm not an expert. Then again, the original poster is not known for providing correct (or useful) posts, in my opinion.marsell wrote: ↑Tue Aug 20, 2019 3:32 pm1. I always thought NN Engines only learn in training and not in game play or analyzing mode.Chessqueen wrote: ↑Tue Aug 20, 2019 2:34 pm I forced LCZero to play the same opening 5 times and after it lost the first two games I gave it to analyze and when it play from the 3rd game on it avoided playing the same losing moves which made it to lose against Stockfish and it won game 3, 4 and 5.
PS: I was wondering if ab engines have this capability that after it analyze the games that it lost it avoid making the same losing move again.?
-
- Posts: 5582
- Joined: Wed Sep 05, 2018 2:16 am
- Location: Moving
- Full name: Jorge Picado
Re: The advantages of NN Learning engines..........
I used the wrong word, this is what I did I took a chess opening and decided from the very beginning to only play with this opening and with the same side not Lczero playing Black and then white. Lczero always played with the black side. The first game stockfish won, then the second time around Stockfish won again. ( Here is where I used the wrong term not that LCZero analyze the opening and found out where the bad move was chosen after the end of the opening), but instead I fed both SF and LC0 the same opening again for the third the fourth and the fifth time, and somehow LCZero after the opening decided not to make the exact moves that it made in the previous first two games that it lost, but instead it made different moves NOT replicating the exact games even if Stockfish played the exact moves that it did before, and once it found that the outcome of the third game has a winning line it kept on repeating the exact moves against stockfish which stockfish played the exact losing moves again in the fourth and once again in the 5th game. Somehow once LCZero found the correct sequence of moves it simply repeated as long as Stockfish repeated the same replying moves. I do not know if it has something to do with the implemented general reinforcement learning Algorithm, but it seems to work like a human GM that if a sequence of moves give it a winning game as long as the opponent continue playing the exact moves the human GM will also play the same line that it found on game 3, 4 and 5th. This general reinforcement learning algorithm is what makes Leela beat Stockfish when it plays the same opening more than once when you have a long match over 100 games.zullil wrote: ↑Tue Aug 20, 2019 4:08 pmI believe you are correct. I don't believe any version of Lc0 alters a weights file or creates a "learning file". But I'm not an expert. Then again, the original poster is not known for providing correct (or useful) posts, in my opinion.marsell wrote: ↑Tue Aug 20, 2019 3:32 pm1. I always thought NN Engines only learn in training and not in game play or analyzing mode.Chessqueen wrote: ↑Tue Aug 20, 2019 2:34 pm I forced LCZero to play the same opening 5 times and after it lost the first two games I gave it to analyze and when it play from the 3rd game on it avoided playing the same losing moves which made it to lose against Stockfish and it won game 3, 4 and 5.
PS: I was wondering if ab engines have this capability that after it analyze the games that it lost it avoid making the same losing move again.?
Do NOT worry and be happy, we all live a short life
-
- Posts: 4606
- Joined: Wed Oct 01, 2008 6:33 am
- Location: Regensburg, Germany
- Full name: Guenther Simon
Re: The advantages of NN Learning engines..........
You have it all wrong. It has no learning and no reinforcement learning either.Chessqueen wrote: ↑Tue Aug 20, 2019 6:18 pmI used the wrong word, this is what I did I took a chess opening and decided from the very beginning to only play with this opening and with the same side not Lczero playing Black and then white. Lczero always played with the black side. The first game stockfish won, then the second time around Stockfish won again. ( Here is where I used the wrong term not that LCZero analyze the opening and found out where the bad move was chosen after the end of the opening), but instead I fed both SF and LC0 the same opening again for the third the fourth and the fifth time, and somehow LCZero after the opening decided not to make the exact moves that it made in the previous first two games that it lost, but instead it made different moves NOT replicating the exact games even if Stockfish played the exact moves that it did before, and once it found that the outcome of the third game has a winning line it kept on repeating the exact moves against stockfish which stockfish played the exact losing moves again in the fourth and once again in the 5th game. Somehow once LCZero found the correct sequence of moves it simply repeated as long as Stockfish repeated the same replying moves. I do not know if it has something to do with the implemented general reinforcement learning Algorithm, but it seems to work like a human GM that if a sequence of moves give it a winning game as long as the opponent continue playing the exact moves the human GM will also play the same line that it found on game 3, 4 and 5th. This general reinforcement learning algorithm is what makes Leela beat Stockfish when it plays the same opening more than once when you have a long match over 100 games.zullil wrote: ↑Tue Aug 20, 2019 4:08 pmI believe you are correct. I don't believe any version of Lc0 alters a weights file or creates a "learning file". But I'm not an expert. Then again, the original poster is not known for providing correct (or useful) posts, in my opinion.marsell wrote: ↑Tue Aug 20, 2019 3:32 pm1. I always thought NN Engines only learn in training and not in game play or analyzing mode.Chessqueen wrote: ↑Tue Aug 20, 2019 2:34 pm I forced LCZero to play the same opening 5 times and after it lost the first two games I gave it to analyze and when it play from the 3rd game on it avoided playing the same losing moves which made it to lose against Stockfish and it won game 3, 4 and 5.
PS: I was wondering if ab engines have this capability that after it analyze the games that it lost it avoid making the same losing move again.?
It was just randomness due to thinking time and whatever happened on your machine.
-
- Posts: 201
- Joined: Thu Jun 06, 2019 8:05 pm
- Full name: Percival Tiglao
Re: The advantages of NN Learning engines..........
The main advantage of NN engines is the ability to operate on a 100 TFlop machines that cost under $1000.
Typical CPUs, even with 32-cores and SIMD optimizations, only achieve maybe 0.5 TFlops, 200x slower than a GPU. GPUs however, are hard to program. NNs are a hammer to utilize GPU-compute (GPUs, especially NVidia's Tensor Cores, can efficiently implement a NN convolve operations).
Typical CPUs, even with 32-cores and SIMD optimizations, only achieve maybe 0.5 TFlops, 200x slower than a GPU. GPUs however, are hard to program. NNs are a hammer to utilize GPU-compute (GPUs, especially NVidia's Tensor Cores, can efficiently implement a NN convolve operations).
-
- Posts: 536
- Joined: Thu Mar 09, 2006 3:01 pm
Re: The advantages of NN Learning engines..........
I certainly defer to the Lc0 experts, but I think the default mode with Leela is not to clear memory tables between games. Of course this is not learning, but it does skew things. For example, if you run a match with two identical copies of Lc0 and a book with say 2 moves depth, one engine will tend to look stronger than another. However, if you re-run the match and force your tourney manager to restart the Lc0 instances each game, you will see that it stays almost exactly even, rarely if ever with one engine ahead of the other by more than one game.
-
- Posts: 6442
- Joined: Tue Jan 09, 2007 12:31 am
- Location: PA USA
- Full name: Louis Zulli
Re: The advantages of NN Learning engines..........
Here's what Lc0 does in response to the "ucinewgame" command:
Code: Select all
void EngineController::NewGame() {
// In case anything relies upon defaulting to default position and just calls
// newgame and goes straight into go.
move_start_time_ = std::chrono::steady_clock::now();
SharedLock lock(busy_mutex_);
cache_.Clear();
search_.reset();
tree_.reset();
time_spared_ms_ = 0;
current_position_.reset();
UpdateFromUciOptions();
}
So, if Lc0 is not reset between games, it's the fault of the GUI, not a design choice of the engine programmers.ucinewgame
this is sent to the engine when the next search (started with "position" and "go") will be from
a different game. This can be a new game the engine should play or a new game it should analyse but
also the next position from a testsuite with positions only.
If the GUI hasn't sent a "ucinewgame" before the first "position" command, the engine shouldn't
expect any further ucinewgame commands as the GUI is probably not supporting the ucinewgame command.
So the engine should not rely on this command even though all new GUIs should support it.
As the engine's reaction to "ucinewgame" can take some time the GUI should always send "isready"
after "ucinewgame" to wait for the engine to finish its operation.