Einstein wuerfelt nicht

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Einstein wuerfelt nicht

Post by hgm »

You could try this position (A=1, B=2 etc.):

c4/f4/5/5/4D w - - 0 1

According to my engine it has a 34.24% winning chance for white.

Code: Select all

dep	score	nodes	time	(not shown:  tbhits	knps	seldep)
 24	 -15.76 	3.78G	11:24.56	e1d2 
 23	 -15.76 	2.63G	7:40.79	e1d2 
 22	 -15.76 	1.78G	4:59.30	e1d2 
 21	 -15.76 	1.17G	3:10.29	e1d2 
 20	 -15.76 	746.0M	1:54.93	e1d2 
 19	 -15.76 	463.2M	1:09.38	e1d2 
 18	 -15.76 	279.3M	0:41.02	e1d2 
 17	 -15.76 	162.8M	0:23.50	e1d2 
 16	 -15.76 	91.7M  	0:13.09	e1d2 
 15	 -15.76 	49.7M  	0:07.00	e1d2 
 14	 -15.76 	25.7M  	0:03.60	e1d2 
 13	 -15.76 	13.2M  	0:01.86	e1d2 
 12	 -15.76 	6.32M  	0:00.90	e1d2 
 11	 -15.76 	3.27M  	0:00.49	e1d2 
 10	 -15.76 	1.29M  	0:00.21	e1d2 
  9	 -16.71 	539772	0:00.11	e1d2 
  8	 -15.57 	221791	0:00.06	e1d2 
  7	 -16.45 	89185  	0:00.03	e1d2 
  6	 -16.45 	46100  	0:00.00	e1d2 
  5	+11.37 	3015    	0:00.00	e1d2 
  4	+27.15 	1003    	0:00.00	e1d2 
  2	  0.00 	1          	0:00.01	throw 5, stone 4 
 
The game can last at most 8 moves (15 ply) here, if the white stone makes the maximum detour, but there probably isn't any reason toever do that. Although the nominal depth of the iterative deepening is not easy to interpret, (it is not a fixed-depth search) I am pretty sure that it searches to the end of the game here.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Einstein wuerfelt nicht

Post by Evert »

Ok, I figured out what the problem is with the "full width" search I have: it just calculates the value of the node for a random mover; of course it doesn't actually play as one: if there is a move that wins the game, it plays that 100% of the time, but even so it will score the node as if it plays the winning move 33% of the time.

I need to give this a moment of thought. Rather than a score or an evaluation, I propagate win/loss counts through the tree. This is fine if the first move I try is the only win (and I take a cut-off afterwards), but if the first move I try loses and the second move wins, the current node needs to be win 100% rather than win 50%/lose 50%.

What isn't immediately obvious to me is how MC search handles this situation. I suppose it's not a problem if it doesn't report the current node as 100% won, as long as it converges to 100% won given sufficient (ie, infinite) samples (and picks the correct move at the root). I may try a proper MC search, just for trying something different.

I actually don't have any sort of evaluation at the moment. There are some obvious terms (distance to winning; value of the different stones; you'd rather lose stone 3 than stone 6 because the former gets you more move options when you roll a 3 while the latter just makes you more likely to move stone 5) but I have no clue about weights. I might try to keep it evaluation light.

My program currently doesn't speak CECP either, but that should be easy to change.
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Einstein wuerfelt nicht

Post by hgm »

I never did a real MC search. But I would be inclined to only propagate the stats of a move that obviously is best, in situations where you can freely choose between moves. Stats of non-best moves are only relevant for proving they are non-best. From the stats of each move you could calculate the probability that it is best, and you could weight them accordingly.