Getting ready for Thermopylae
Moderator: Ras
-
- Posts: 28382
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Getting ready for Thermopylae
OK, I started the first cycle, a full round-robin from the official opening position. I will start a thread to discuss it in the tournament forum section.
-
- Posts: 4186
- Joined: Tue Mar 14, 2006 11:34 am
- Location: Ethiopia
Re: Getting ready for Thermopylae
I finished a playout searcher starting from the root position for Go. I have difficult applying it to chess though, because I don't know of a fast random move generator for it. I could try to generate random from and to squares but that could take forever until it gets a legal move I guess. As a last resort I can use a simple generate all and pick one, but that will make it very slow. Ideas for fast random chess move generator ?
I am not actually playing out to the end of the game. There is a MAX_PLY = 96 barrier at which point eval() will be called and the final result guestimated as a win , loss or draw. If we reached a terminal node before that the correct score will be backed up. For 9x9 go actually most will be terminal nodes.
I am not actually playing out to the end of the game. There is a MAX_PLY = 96 barrier at which point eval() will be called and the final result guestimated as a win , loss or draw. If we reached a terminal node before that the correct score will be backed up. For 9x9 go actually most will be terminal nodes.
-
- Posts: 4186
- Joined: Tue Mar 14, 2006 11:34 am
- Location: Ethiopia
Re: Getting ready for Thermopylae
Great I will watch and analyze games with Nebiyu to catch tactical blunders and brilliance and store them as epd format.
-
- Posts: 28382
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Getting ready for Thermopylae
isit necessary that you generate all moves with equal probability?
The way I would do it is keep a piece list, and for each piece type prepare a list with all move vectors it could ever make. (So for a Queen there would be 8 directions times 7 distances = 56 moves.)
Then pick a piece from the piece list with a probability proportional to the number of possible move vectors, and randomly pick a move for it from the vector list. Test if the to-square calculated from the known piece location and vector is on-board, and if so, if it is legal (using 0x88 or bitboard attack set). If not, start completely from scratch. This should give you a legal move in 4-5 tries, except perhaps in the opening position where you are very poorly developed.
The way I would do it is keep a piece list, and for each piece type prepare a list with all move vectors it could ever make. (So for a Queen there would be 8 directions times 7 distances = 56 moves.)
Then pick a piece from the piece list with a probability proportional to the number of possible move vectors, and randomly pick a move for it from the vector list. Test if the to-square calculated from the known piece location and vector is on-board, and if so, if it is legal (using 0x88 or bitboard attack set). If not, start completely from scratch. This should give you a legal move in 4-5 tries, except perhaps in the opening position where you are very poorly developed.
-
- Posts: 4186
- Joined: Tue Mar 14, 2006 11:34 am
- Location: Ethiopia
Re: Getting ready for Thermopylae
Indeed I was thinking of similar lines too. But it looks like generating all moves and picking one is better as I can not think of shortcut ways for checkers muti-captures, reversi , amazons etc.. Even for Go the move generator is very fast as I keep a list of empty spaces. So there is no real penalty for actually generating moves. My first result is it can finish of KRK endgames if I put the loosing king at the center.
For amazons where I can search only 4 plies in the opening, I think the playout is much better. It can bring distant information easily. Once zones start forming , maybe I will switch to alpha-beta. Who knows the MC may work better there too.
For amazons where I can search only 4 plies in the opening, I think the playout is much better. It can bring distant information easily. Once zones start forming , maybe I will switch to alpha-beta. Who knows the MC may work better there too.
-
- Posts: 28382
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: Getting ready for Thermopylae
With Q=Ferz and N=Nightrider:Evert wrote:I know. What I meant was, I dnn't understand how the described fortress draw for king vs. king with nightrider and ferz works. Probably trying it out on the board instead of trying to "see it" in my head would help.
[d] 1K6/8/8/8/6k1/6Q1/8/7N w - - 0 1
1... Kf3 2. Fh4 ( 2. Kc7? Kg2! 3. Hd3 Kxg3) 2... Kg4 3. Fg3
The black King chases the Ferz, which would be doomed at the edge, if it were not for the possibility to escape to the square defended by the Nightrider. (The Nightrider has nomoves to protect it in-place.) But then Black threatens a fork on Nightrider + Ferz, keeping the Ferz under attack, so the Nightrider cannot move without abandoning it. So the Ferz is chased back to the edge to escape the fork.
I would not really call this a fortress draw. It is tactics to win a white piece, profiting from the poor placement. Which is just not good enough to actually force the conversion. But the threat of it can be used to force a repetition. It realy would be better to call this a perpetual chase rather than a fortress draw. Although even in Xiangqi a chase like this would be allowed for multiple reasons.
-
- Posts: 4186
- Joined: Tue Mar 14, 2006 11:34 am
- Location: Ethiopia
Re: Getting ready for Thermopylae
Funny thing happened when I tried to include heuristic win/loss/draw assignment based on the evaluation and the progress relative to the root.
It suddenly started missing one ply tactics
It was because I was doing the playouts only from the root. In the previous case when I did counts of actual wins (mates), there were no such tactical problems and it can actually give mate in the shortest possible path. Average winning rate was higher for the best move. But now it seems that I have to start expanding the best move and see if there is one single refutation to the best move i.e the UCT way. Or maybe I will just do alpha-beta with a couple of hundred playouts at the leaves to be used for making progress in endgames.
It suddenly started missing one ply tactics
