playing against yourself idea to get positional bias idea

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Uri Blass
Posts: 10378
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

playing against yourself idea to get positional bias idea

Post by Uri Blass »

The idea is that sometimes the computer evaluate the position wrong and a result of games against yourself may be a hint for it and the main question is if it works(it is possible that chess it too tactical so it does not work)

The idea is the following and I wonder if somebody tried it and what are the results.

At the beginning of the search play games against yourself at depth 1 for every root move until you get a draw or evaluation that is bigger than +3 pawns for one side and you adjudicate based on the evaluation(you can also have some different contant than +3).

If you did not finish 5% of the expected search time(you can have also different constant than 5%) repeat the process with depth 2
and continue in that way.

Every root move is going to have some result attached to it(0 or 0.5 or 1) and you also can remember information in the hash from the games against every root move.

After playing the games start to search normally when the only difference except having moves in the hash tables is that you have some positional bias for the moves based on the results of the games.

for example in the opening position suppose 1.e4 is win for white and 1.d4 is draw and 1.c4 is win for black.

Suppose the bias that you define is 0.05 pawns.

You remember to increase the score of 1.e4 by 0.05 pawns and reduce the score of 1.c4 by 0.05 pawns so if the real score of 1.e4 is 0.06 for white you treat it like 0.11 pawns for white and you need to find a score that is better than 0.11 pawns for white to change your mind to 1.d4.
when you search the move 1.c4 you need to find a score that is better than 0.16 pawns for white in order to change your mind to play c4.

The computer of course remember the real scores and you only need to increase beta for part of the root moves and to reduce beta for part of the root moves
(if the computer suggests 1.c4 with score of 0.17 then the user may see 0.12(that is 0.17 minus 0.05) but the computer knows in the hash that it is really 0.17)
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: playing against yourself idea to get positional bias ide

Post by Don »

Uri Blass wrote:The idea is that sometimes the computer evaluate the position wrong and a result of games against yourself may be a hint for it and the main question is if it works(it is possible that chess it too tactical so it does not work)

The idea is the following and I wonder if somebody tried it and what are the results.

At the beginning of the search play games against yourself at depth 1 for every root move until you get a draw or evaluation that is bigger than +3 pawns for one side and you adjudicate based on the evaluation(you can also have some different contant than +3).

If you did not finish 5% of the expected search time(you can have also different constant than 5%) repeat the process with depth 2
and continue in that way.

Every root move is going to have some result attached to it(0 or 0.5 or 1) and you also can remember information in the hash from the games against every root move.

After playing the games start to search normally when the only difference except having moves in the hash tables is that you have some positional bias for the moves based on the results of the games.

for example in the opening position suppose 1.e4 is win for white and 1.d4 is draw and 1.c4 is win for black.

Suppose the bias that you define is 0.05 pawns.

You remember to increase the score of 1.e4 by 0.05 pawns and reduce the score of 1.c4 by 0.05 pawns so if the real score of 1.e4 is 0.06 for white you treat it like 0.11 pawns for white and you need to find a score that is better than 0.11 pawns for white to change your mind to 1.d4.
when you search the move 1.c4 you need to find a score that is better than 0.16 pawns for white in order to change your mind to play c4.

The computer of course remember the real scores and you only need to increase beta for part of the root moves and to reduce beta for part of the root moves
(if the computer suggests 1.c4 with score of 0.17 then the user may see 0.12(that is 0.17 minus 0.05) but the computer knows in the hash that it is really 0.17)
When you say, "play against yourself" do you mean to manually play against a human or do you mean the computer plays games against itself? If you mean the computer plays against itself, you are describing something that is similar to Monte Carlo playouts - but without the randomness. This can be extended to MCTS which is Monte Carlo Tree Search which involves playing (semi) random games but doing it in a controlled way by storing the early part of the tree. It is much like building a book, where you bias the moves you play based on past results.

I have always believed that if you can build a book using some automated method, then you probably could use the same method to select a move over the board. As far as we know so far the best method to choose a move is to do as deep a search as possible in the amount of time we have - so I have to wonder if there is anything better for building a book (in a fully automated way) than just searching each position as deeply as possible. If there is, then why are we not using a scaled down version of that for selecting a move?

I think your basic concept will produce better positional moves relative to tactics. But with modern programs tactics and positional play blend together. I don't know if you can improve very much on positional play without also improving the tactics.
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
Uri Blass
Posts: 10378
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: playing against yourself idea to get positional bias ide

Post by Uri Blass »

I meant the computer play against itself and the idea is that 90% of the time is going to be used for normal search but using the positional bias.

The tactical level is not going to be reduced significantly if you use 10% of the time for Monte Carlo playouts and later you use 90% of the time for normal search with some positional bias about root moves and the question if you can get some positional improvement thanks to the positional bias.