Mate Score

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
tomitank
Posts: 258
Joined: Sat Mar 04, 2017 11:24 am
Location: Hungary

Mate Score

Post by tomitank » Tue Jun 27, 2017 9:14 am

Hi!

Which one is better? (Why?)
I'm using Fail-Soft, Aspiration Windows (50), PVS, NMP, Hash Table, LMR, Razoring, Futility Pruning, LMP.

Vice 1.0:

Code: Select all

#define MAXDEPTH 64
#define INFINITE 30000
#define ISMATE (INFINITE - MAXDEPTH)
Sungours 1.4:

Code: Select all

#define MAX_PLY         64
#define INF             32767
#define MATE            32000
#define MAX_EVAL        2999
Tamas

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

Re: Mate Score

Post by hgm » Tue Jun 27, 2017 10:54 am

The first seems wrong: mate distance can easily be larger than MAXPLY (assuming that the latter is the ultimate limit t the search depth). Engines with TT can see mates beyond the horizon through grafting.

tomitank
Posts: 258
Joined: Sat Mar 04, 2017 11:24 am
Location: Hungary

Re: Mate Score

Post by tomitank » Tue Jun 27, 2017 11:37 am

For the first one:

King value: 50000

Save tt:

Code: Select all

if (score > ISMATE) {
	score += boardPly;
&#125; else if &#40;score < -ISMATE&#41; &#123;
	score -= boardPly;
&#125;
Score from tt:

Code: Select all

				
if &#40;value > ISMATE&#41; &#123;
	value -= boardPly;
&#125; else if &#40;value < -ISMATE&#41; &#123;
	value += boardPly;
&#125;
Video:
https://youtu.be/clLaVOnvUvA?t=2m17s

But Vice use fail hard.

With fail-soft, is can it still wrong?

Tamas

User avatar
Nordlandia
Posts: 2743
Joined: Fri Sep 25, 2015 7:38 pm
Location: Sortland, Norway

Re: Mate Score

Post by Nordlandia » Tue Jun 27, 2017 11:46 am

How does excessive king value influence overall gameplay?

For example King value: 5,000,000,000,000

tomitank
Posts: 258
Joined: Sat Mar 04, 2017 11:24 am
Location: Hungary

Re: Mate Score

Post by tomitank » Tue Jun 27, 2017 12:40 pm

I do not know.

Maybe, if there is no king for some mistake?

This is all misty for me.

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

Re: Mate Score

Post by hgm » Tue Jun 27, 2017 12:51 pm

tomitank wrote: But Vice use fail hard.

With fail-soft, is can it still wrong?
Yes, it is still wrong. The necessary adjustment for mate scores would not take place for mate scores between -ISMATE and ISMATE.

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

Re: Mate Score

Post by hgm » Tue Jun 27, 2017 12:56 pm

Nordlandia wrote:How does excessive king value influence overall gameplay?

For example King value: 5,000,000,000,000
King value should not affect game play. Fairy-Max uses king value = -1, and in search recognizes victims with negative value as royal, terminating the branch with +INF score if the value is -1.

User avatar
Nordlandia
Posts: 2743
Joined: Fri Sep 25, 2015 7:38 pm
Location: Sortland, Norway

Re: Mate Score

Post by Nordlandia » Tue Jun 27, 2017 1:33 pm

hgm wrote:
Nordlandia wrote:How does excessive king value influence overall gameplay?

For example King value: 5,000,000,000,000
King value should not affect game play. Fairy-Max uses king value = -1, and in search recognizes victims with negative value as royal, terminating the branch with +INF score if the value is -1.
Some earlier computer chess programs aligned the king an arbitrary large value (1,000,000,000 points) As a result the King remained on the first rank throughout the entire game :D

That number indicate king safetey is paramount, so the King shouldn't be centralized and rule out the possibility to get mated.

In a nutshell - in a regular pawn ending, the king messed around in the corner instead of heading to the center of the board.

Those days are over.

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

Re: Mate Score

Post by hgm » Tue Jun 27, 2017 3:02 pm

The value of a piece should not determine where it prefers to go. In my first chess program I assumed it would be sufficient to give the king a very high value to keep it out of check. Instead it just started to reply to checks with counter-checks, in an attempt to trade kings. You really have to program that there is no opportunity for retaliation after you lost your king.

User avatar
JVMerlino
Posts: 1054
Joined: Wed Mar 08, 2006 9:15 pm
Location: San Francisco, California

Re: Mate Score

Post by JVMerlino » Tue Jun 27, 2017 3:25 pm

hgm wrote:
Nordlandia wrote:How does excessive king value influence overall gameplay?

For example King value: 5,000,000,000,000
King value should not affect game play. Fairy-Max uses king value = -1, and in search recognizes victims with negative value as royal, terminating the branch with +INF score if the value is -1.
If you allow the King to capture a piece in SEE, then isn't a very high King value necessary?

Post Reply