Symbolic vs KingSlayer

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

Re: Symbolic vs KingSlayer

Post by hgm »

Ah yes, I still have to change the name in the source itself. The name Simple was already used by Remi Coulom.

I am now trying KingSlayer - FairyMax games with King Slayer's drawishness detection switched on. (So it knows that KNK is not +3 etc.) This seems to hardly have any effect in 40/1min games; they are almost all decided in the middle game, and hardly ever reach the stage where the leading side only has a single Pawn. Of the 30 games I watched so far I only saw one KRNPKRN game where King Slayer (the KRN side) without hesitation traded Rooks and then gave N for P to draw. Not sure it would have lost otherwise, but its King was pretty far from the passer's path. I guess I need either longer TC or a better opponent to get enough near-equal end-games that this evaluation term starts to matter.

GNU Chess 5.07 might be a good opponent, because IIRC it randomizes its moves. (And it used to be about the strength of Joker.) Can that still be obtained somewhere?
Last edited by hgm on Thu Oct 01, 2015 5:34 pm, edited 1 time in total.
User avatar
Guenther
Posts: 4610
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: Symbolic vs KingSlayer

Post by Guenther »

hgm wrote:Ah yes, I still have to change the name in the source itself. The name Simple was already used by Remi Coulom.
Will KingSlayer be a follow-up of Joker?
User avatar
hgm
Posts: 27811
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Symbolic vs KingSlayer

Post by hgm »

I have not decided that yet. If it would get stronger than Joker it would automatically count as successor, I suppose. The primary design goal was not strength but a code without any frills that only served to speed it up. It was basically an answer to the question "is there a simple engine that can beat Fairy-Max". I had not intended it to go much beyond that. And as it is meant more as a code example, I had not really planned on tuning its eval parameters.

My original successor of Joker was Spartacus, but I haven't worked on that for about 5 years now, and the source code seems to have forked somehow, as I now have different executables that show different erroneous behavior, and I cannot match them to any source code that I can find. Spartacus was intended to be an attack-map-based engine that could handle a variety of board sizes, from 12x8 to 10x10. The attack map once worked for 8x8 boards, but quickly after that changing the board size broke it. And by now my ideas for how to do an attack map have evolved a lot, and I don't like the original system anymore.

King Slayer is very much based on an 8x8 board, so it cannot really replace Spartacus. To make its creation not a complete waste of time I build one unvommon feature in it, however: every move can specify an e.p. victim, and this victim can be handled in addition to the normal victim on its to-square. That would make it suitable for playing variants that have double capture, such as Might-Lion Chess or Werewolf Chess. This could be an incentive to develop it further.
Daniel Anulliero
Posts: 759
Joined: Fri Jan 04, 2013 4:55 pm
Location: Nice

Re: Symbolic vs KingSlayer

Post by Daniel Anulliero »

hgm wrote:Ah yes, I still have to change the name in the source itself. The name Simple was already used by Remi Coulom.

I am now trying KingSlayer - FairyMax games with King Slayer's drawishness detection switched on. (So it knows that KNK is not +3 etc.) This seems to hardly have any effect in 40/1min games; they are almost all decided in the middle game, and hardly ever reach the stage where the leading side only has a single Pawn. Of the 30 games I watched so far I only saw one KRNPKRN game where King Slayer (the KRN side) without hesitation traded Rooks and then gave N for P to draw. Not sure it would have lost otherwise, but its King was pretty far from the passer's path. I guess I need either longer TC or a better opponent to get enough near-equal end-games that this evaluation term starts to matter.

GNU Chess 5.07 might be a good opponent, because IIRC it randomizes its moves. (And it used to be about the strength of Joker.) Can that still be obtained somewhere?
http://ftp.gnu.org/gnu/chess/
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Underpromotion

Post by sje »

In the following position:
[d]k2r2r1/4pP2/7p/4q3/P2p4/1p4PN/1P3PK1/2R4R w - - 0 32[/d]
Symbolic played 32. fxg8=N and KingSlayer replied with 32... Rxg8. But looking at the code, KingSlayer was fortunate to have captured the knight as it can't correctly parse an underpromotion; if it had left the knight alone then the program possibly would have eventually lost by making an illegal move or refusing a legal move by Symbolic.
Robert Pope
Posts: 558
Joined: Sat Mar 25, 2006 8:27 pm

Re: Underpromotion

Post by Robert Pope »

sje wrote:In the following position:
[d]k2r2r1/4pP2/7p/4q3/P2p4/1p4PN/1P3PK1/2R4R w - - 0 32[/d]
Symbolic played 32. fxg8=N and KingSlayer replied with 32... Rxg8. But looking at the code, KingSlayer was fortunate to have captured the knight as it can't correctly parse an underpromotion; if it had left the knight alone then the program possibly would have eventually lost by making an illegal move or refusing a legal move by Symbolic.
Is there some actual search/evaluation logic that caused it to promote to knight instead of queen here, or was it just random ordering of the promotions?
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

Re: Underpromotion

Post by sje »

Robert Pope wrote:Is there some actual search/evaluation logic that caused it to promote to knight instead of queen here, or was it just random ordering of the promotions?
Most likely, the program considered all promotions to have the same value here, so it didn't matter which promotion was chosen.
User avatar
hgm
Posts: 27811
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Underpromotion

Post by hgm »

Indeed, that is still one of the TODOs. I guess at the stage where I am now much more important than debugging more eval terms. But of course when King Slayer would have the option to not capture the Knight, Symbolic would not have promoted to Knight. It could of course choose topromote to Knight because it would promote with check then, rather than using it as a "don't care".

King Slayer performs moves at game level by comparing the from- and to-square of moves coming from the move generator with those of the input move. The 'flags' field of the generated moves is not compared, because in general it would be quite tedious to derive the correct value of it. (As e.p.captures, double pushes and castlings would also have non-zero flags, while they are already uniquely determined by their from- and to-square.) In addition currently not all under-promotions are generated by King Slayer, so there might not be an exact match.

I guess the best way out would be to let King Slayer generate all under-promotions, and in the input promotion suffic determine the desired flags code, and consider the flags code only when inputFlags is non-zero. That seems simpler than substituting the Queen in the firs-matching move for the chosen piece (which requires adjustment of the hash key and incremental pstEval).
PK
Posts: 893
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: Underpromotion

Post by PK »

just for the record: promised simple engine based on Sungorus is available at https://github.com/nescitus/Rodent_II (source code only). I guess it is 2500+ if You need an opponent in this range.
User avatar
hgm
Posts: 27811
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Underpromotion

Post by hgm »

I pushed a commit now that will handle input of under-promotions, and will consider all promotions in search (was only Q and N). So King Slayer can now also solve the following position:

[d]5q2/4P2k/8/5N1K/8/8/8/8 w - - 0 1