Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: EGTB Indexing

Author: Robert Hyatt

Date: 08:39:50 04/10/03

Go up one level in this thread


On April 10, 2003 at 09:17:00, Vincent Diepeveen wrote:

>On April 10, 2003 at 07:39:29, Tony Werten wrote:
>
>>On April 10, 2003 at 06:06:10, Guido wrote:
>>
>>>On April 09, 2003 at 10:25:02, Tony Werten wrote:
>>>
>>>>On April 09, 2003 at 09:34:50, Guido wrote:
>>>>
>>>>>On April 09, 2003 at 02:42:17, Tony Werten wrote:
>>>>>
>>>>>>On April 08, 2003 at 18:15:33, Guido wrote:
>>>>>>
>>>>>>>On April 08, 2003 at 02:57:42, Tony Werten wrote:
>>>>>>>
>>>>>>>>On April 07, 2003 at 14:28:55, Dieter Buerssner wrote:
>>>>>>>>
>>>>>>>>>On April 06, 2003 at 16:09:02, Tony Werten wrote:
>>>>>>>>>
>>>>>>>>>>For simple EGTB:
>>>>>>>>>>
>>>>>>>>>>After placing the white king, there are only 63 squares left, after placing the
>>>>>>>>>>white king there are only 62 squares left. So the index would be calculated
>>>>>>>>>>((((SQWK*64)+SQBK)*63)+SQWR)
>>>>>>>>>>
>>>>>>>>>>SQBK (square black king ) would be adjusted as follows: if SQBK<SQWK then
>>>>>>>>>>dec(SQBK)
>>>>>>>>>>SQWR would be adjusted: if SQWR<SQWK then dec(SQWR); if SQWR<SQBK then dec(SQWR)
>>>>>>>>>>
>>>>>>>>>>That's the trick that saves space (well, to start with) Of course it has 1 nasty
>>>>>>>>>>side effect: You can go from a position to an index, but it's quite impossible
>>>>>>>>>>to get the position back from an index.
>>>>>>>>>
>>>>>>>>>I think it is easy.
>>>>>>>>
>>>>>>>>No it's not. The fact that it works in my simplified example doesn't mean
>>>>>>>>anything, since nobody uses this.
>>>>>>>
>>>>>>>I use this in my EGTBs and it is OK also in a not simplified example.
>>>>>>
>>>>>>Do you include EP as well? That's where my "quite impossible"  starts coming in.
>>>>>
>>>>>No, I don't include EP in tablebases generation, at least for now, but EP is
>>>>>considered in my EGTBs utilization, simulating the execution of the possible
>>>>>immediate EP capture. This way of operating is not completely correct, as Uri
>>>>>Blass demonstrated to me in a past thread, but I think that it gives an
>>>>>erroneous result in very few positions.
>>>>
>>>>Probably the safest way (I used to use) is jump out of the probing code with a
>>>>"position not found" result. Your search will continue and find the correct
>>>>result 1 ply later.
>>>>
>>>>Tony
>>>
>>>Yes, this is also possible, but in this way my solution would be better because
>>>the result is obtained immediately simulating EP capture.
>>>But the problem is not solved correctly, as Uri Blass demonstrated to me with
>>>this easy example:
>>>
>>>[D]1K6/2p5/8/1P6/8/8/8/k7 b - - 0 1
>>>
>>>If I look for the result in tablebases without EP (black moves), it is a draw,
>>>while the actual situation is a loss, and in this situation no EP capture still
>>>exists.
>>
>>If the tablebases have been generated with the same skip trick, this position
>>would have been assigned the value "loss". ie The position after f5 will be
>
>c5 i may hope otherwise your move generator also needs revision ;)
>
>>found (without ep square:draw), but since an epsquare exists, it is not
>>accepted. All replies are generated (including the ep capture) and the score
>>will be a win for white.
>>
>>Tony
>
>let's face it. this position is not realistic. show me a realistic position
>where i need to add en passant for which changes game outcome.

They exist.  I ran into several when using Edward's original KPKP table that
did not handle EP.

Eugene's tables do handle it correctly so the problem is moot for those of us
using them..

It wrecked me in more than one ICC game before I put the test in to avoid probes
when EP could be possible in future branches of the tree....


>
>this position will not get on the board simply. so who cares for en passant. i
>still have to add it to my format and will do it but so far i saw zero practical
>reasons to do so.
>
>i could not come up with 1 position which actually could get on my board where a
>loss turns into a win.

No, but a win can turn into a draw.

>
>If a draw turns into a loss then that's bad luck. but why would i do the effort
>of building EP into my 6 men EGTB generator?

Eugene does it so it really is irrelevant whether you choose to do it right or
half-assed...


>
>the only thing i know is that diep lost a game once against genius, years ago at
>auto232 player, when i had forgotten to hash en passant.
>
>however that's with many pieces. egtbs are up to 6 men.
>
>KRP KRP and such.
>
>In scenario's like KRPP KR we already do not have en passant.
>
>So more likely en passant is relevant in positions with 2 - 4 pawns and no other
>pieces.
>
>Let's skip all 3-5 men simply. Let's just focus upon 6 men.
>
>KPP KPP.
>
>basically we talk about a few positions where the king is in quadrant and the
>other king is not. only the en passant can take care it is outside of quadrant.
>
>But of course only when the position when en passant gets taken into account is
>a draw.
>
>Now that's not so easy to construct!

It is pretty easy.  Positions where I can play h2-h4 and create a passed pawn
that can
run, even though you have a pawn at g4 that could take mine EP if you knew about
it.
That would be fatal if your position is winning and you play h4, because you
lose the
pawn and this becomes a draw or worse.

>
>Let me start trying:
>
>[D]1k6/p2p4/1P1K4/1P6/8/8/8/8 b - -
>
>black plays a5 and wins when bxa6 is not getting played. when bxa6 gets played
>it is white winning.
>
>Now the problem is. How to get this position realistically on the board?
>
>No way simply. last move must have been white capturing something at b6.
>
>That means that move before that black had to recapture to b6 too. In short that
>could not have been a pawn on c7 because there is a king on d6. but that must
>have been a knight on a8 or a bishop or something. But it would be stupid to
>capture with the bishop. axb6 would have won.
>
>A pawn on b7 it could not have been either tha tmoved to b6, because then kc8
>was also possible with a simple win for black.
>
>[D]1k6/pp1p4/3K4/1PP5/8/8/8/8 b - -
>
>pawn on a5 is more interesting:
>
>[D]1k6/pp1p4/3K4/PP6/8/8/8/8 b - -
>
>the problem here is that black doesn't want to play b6 here. after b6 the move
>a6 is also a draw.
>
>So even in a position which is practical impossible to get onto board (an
>endgame position with a black pawn on d7 and a white king on d6???) there there
>still is this high possibility that you will get the desired result when you
>play a different continuation.
>
>Best regards,
>Vincent
>
>
>
>>>IMHO the correct solution for EP is to have two different positions for white
>>>pawns in rank 4 and black pawns in rank 5, using rank 1 and rank 8 respectively,
>>>as discussed in another past thread with Bob Hyatt.
>>>
>>>Ciao
>>>Guido



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.