Stockfish: EGTB not working for eligible variants

Created on 5 Dec 2017  路  41Comments  路  Source: ddugovic/Stockfish

In variant _twokings_ probing syzygy does not work even if both sides extra king is removed from the board. Once both spare kings has vanished from the board, the variant is back to normal FIDE chess.

Doesn't it make sense to probe syzygy if PV results in classic FIDE position without extra kings?

Most helpful comment

The slightly negative evaluation in the position with pawns is actually not caused by the piece values (including the piece-square tables), but by the quadratic material imbalance bonuses, see below. Adding the king to the material imbalance arrays (as for antichess and horde chess) and tuning those values might be worth a try.

setoption name UCI_Variant value twokings
position fen 1n2k3/pppppppp/8/8/8/8/PPPPPPPP/3KK3 w - - 0 1
d
eval
info string variant twokings startpos rnbqkknr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKKNR w KQkq - 0 1

 +---+---+---+---+---+---+---+---+
 |   | n |   |   | k |   |   |   |
 +---+---+---+---+---+---+---+---+
 | p | p | p | p | p | p | p | p |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 | P | P | P | P | P | P | P | P |
 +---+---+---+---+---+---+---+---+
 |   |   |   | K | K |   |   |   |
 +---+---+---+---+---+---+---+---+

Fen: 1n2k3/pppppppp/8/8/8/8/PPPPPPPP/3KK3 w - - 0 1
Key: 3DF2870F8AC0B7D6
Checkers: 
      Eval term |    White    |    Black    |    Total    
                |   MG    EG  |   MG    EG  |   MG    EG  
----------------+-------------+-------------+-------------
       Material |   ---   --- |   ---   --- |  0.14  0.31 
      Imbalance |   ---   --- |   ---   --- | -0.66 -0.66 
          Pawns |   ---   --- |   ---   --- |  0.00  0.00 
        Knights |  0.00  0.00 |  0.03 -0.06 | -0.03  0.06 
        Bishops |  0.00  0.00 |  0.00  0.00 |  0.00  0.00 
          Rooks |  0.00  0.00 |  0.00  0.00 |  0.00  0.00 
         Queens |  0.00  0.00 |  0.00  0.00 |  0.00  0.00 
       Mobility |  0.00  0.00 | -0.04 -0.12 |  0.04  0.12 
    King safety |  1.03 -0.07 |  1.03 -0.07 |  0.00  0.00 
        Threats |  0.00  0.00 |  0.00  0.00 |  0.00  0.00 
   Passed pawns |  0.00  0.00 |  0.00  0.00 |  0.00  0.00 
          Space |  0.00  0.00 |  0.00  0.00 |  0.00  0.00 
     Initiative |   ---   --- |   ---   --- |  0.00 -0.10 
----------------+-------------+-------------+-------------
          Total |   ---   --- |   ---   --- | -0.51 -0.27 

Total Evaluation: -0.19 (white side)

All 41 comments

I wonder how strong SF twokings is in comparison to other engines & whether the code would be much simpler (and handle all single-king positions properly) were it a subvariant (of normal chess).

I'm more than a bit nervous about making any changes before upstream https://github.com/official-stockfish/Stockfish/commit/be382bb0cf5927dc10ff9be882f6980a78d1484a is merged since merging it will probably lose Elo.

Syzygy add endgame strength. One way is to activate syzygy once one king on each side is captured. Maybe this can be added as patch, i don't know how much work this require.

@ddugovic Since Two Kings is not that different from standard chess, I think that the few improvements to piece values and king danger evaluation might have already been sufficient to make it stronger than other engines.

I thought about making it a subvariant of normal chess when I implemented it, but I thought that we would not gain much (only removing some array entries that might in some cases even be useful to optimize), but introducing a non-zero piece value for the king in standard chess would be ugly, and workarounds also do not seem more elegant either.

The contempt change is no functional change for default contempt 0, so I do not see how it is related to twokings or how it affects playing strength. There are some merge conflicts, but the removal of DrawValue should simplify the variant code, e.g., regarding the stalemate evaluation code.

@Nordlandia The gain from tablebases usually is not that much (maybe 10-20 Elo), but it would of course be a nice feature. From a first look at the code, it seems to require a couple of changes, but it would not add much additional logic, so it is not very problematic regarding code maintenance.

Which value is used for non-royal king for the time being?

Mann or Commoner piece is within a knights value. However in _TwoKings_ having both monarchs is an valuable asset i think.

@ianfab supporting syzygy is mainly intended for engine matches or for analysing endgames.

Candidates

  1. Probe syzygy during all times. This mean SF can consult egtb (syzygy assistance) even if 3 or 4 kings is present on board.
  2. Probe syzygy only once FIDE position is present on board.

@Nordlandia The king values (same for royal and non-royal) for middlegame and endgame resulted from SPSA tuning and can be found in types.h. It is a bit less than a knight.

Regarding syzygy, I currently only consider the second option as feasible. Adapting the syzygy generation and probing code requires far more work (and at least I am anyway not very familiar with that code).

According wikipedia article the king surpasses knight in the endgame. Value of 780 might not be the best EG value. Perhaps 800-815 is more correct, narrowing the gap between king and knight endgame value.

Better ask HGM.

@Nordlandia In my experience, tuning usually finds better values than the ones estimated by humans, so human input is more useful for finding new evaluation terms than for optimizing their values. The optimal values can also differ between engines, so human estimates are mostly useful to find a reasonable starting value, afterwards automated tuning can take over. Please also note that the effective piece value for the king might be a bit higher than the raw piece value itself, because the piece-square table bonuses are quite high for the king.

You're right.

Shouldn't SF associate the extra king as more valuable (bonus) than knight or bishop when king ahead?

White is handicaped by removing f1 king. SF evaluation is only +3 which strikes me as slightly odd. The human evaluation is 4+

tk

@Nordlandia The value of the king anyway only plays a role if there is a difference in the number of kings (since it otherwise cancels out), and a difference can only be in the situation of 2 vs. 1 kings if you are not playing with more than two kings. So the values should already be optimized for that case (and for SEE).

@Nordlandia: I don't see why you would think humans would evaluate that position as 4+. I certainly would not do that, and despite everything I do consider myself human. In fact +3 seems already optimistic. This is an opening position, and a genuine Commoner usually performs already worse then a Knight there. Surely the fact that the second King would turn absolutely royal on part of the board would suppress its value even further.

@HGMuller: in the opening the Commoner is inferior to the knight, that's true. What about the endgame? doesn't the Commoner gain strength in the endgame opposed to the opening.

EG value for non-royal king is relatively high opposed to opening value, which indicate stronger EG capabilities.

KingValueMgTwoKings = 526
KingValueEgTwoKings = 780

Isn't SF slightly overoptimistic here? 0.33 advantage for black is trivial though.

Maybe K-pair suffer from redundancy, Neither King does anything that the other one can't do.

tk2

Why ask me, rather than trying it yourself by playing out that position a couple of hundred times? If Stockfish does not randomize enough you can give it a book with 20x20 start positions where one of the Pawns of each side is advanced one step. Then you would know who has the advantage here.

I have only tested this with Fairy-Max, and Fairy-Max is not really smart w.r.t. mating potential (it thinks KNK = +3). So I cannot trust the results are 100% accurate.

@Nordlandia Maybe start with SPSA and https://github.com/ddugovic/Stockfish/tree/tune_variant if you're unsure what parameter value(s) you wish to submit to a test.

My experimental idea/suggestion was to increase endgame value of Commoner to 800. If you're satisfied with current piece values then everything is fine.

I can launch 100 game match 脿 la 3+2 time control in KK vs KN position and see which side is superior.

I choose knight over bishop because Kn has limited mobility.

@Nordlandia Feel free to change the king value and submit tests on fishtest (let me know if you need help). Ideas for improvements are very welcome, and I do not have any preference for a certain value except for the one that turns out to give the best performance Elo-wise. In my experience it is best to simply do tests and let the results decide to avoid overthinking ideas, because whether a certain idea or value works well in an engine also often changes over time as other changes are applied.

The problem is that i have never submitted idea for test before. How do i proceed?

@Nordlandia There is some documentation in the wiki regarding the three steps setting up the repository, creating the branches for testing and submitting a test. I do not know your experience with git, coding, or the fishtest test submission page, so let me know if there is a certain area where you need more detailed explanation.

You do not need to be hesitant when using the test submission page if you are not familiar with it. Worst case something will be inconsistent, then I will not approve the test and it can be deleted (and maybe resubmitted).

KK vs KN scored 13 wins and rest drawn games at 2+2 脿 la 100 games at 1-core. No games was won by black.

Each participant played 50 games with each color.

1n2k3/pppppppp/8/8/8/8/PPPPPPPP/3KK3 w - - 0 1

kk

Maybe KnightValueEgTwoKings is wrong. I've submitted an SPSA parameter tuning session using parameters specified by running ./stockfish:

$ ./stockfish 
Stockfish 071217 64 BMI2 by T. Romstad, M. Costalba, J. Kiiski, G. Linscott
PieceValue[TWOKINGS_VARIANT][MG][1],171,0,342,17.1,0.0020
PieceValue[TWOKINGS_VARIANT][MG][2],764,0,1528,76.4,0.0020
PieceValue[TWOKINGS_VARIANT][MG][3],826,0,1652,82.6,0.0020
PieceValue[TWOKINGS_VARIANT][MG][4],1282,0,2564,128.2,0.0020
PieceValue[TWOKINGS_VARIANT][MG][5],2526,0,5052,252.6,0.0020
PieceValue[TWOKINGS_VARIANT][MG][6],526,0,1052,52.6,0.0020
PieceValue[TWOKINGS_VARIANT][EG][1],240,0,480,24,0.0020
PieceValue[TWOKINGS_VARIANT][EG][2],848,0,1696,84.8,0.0020
PieceValue[TWOKINGS_VARIANT][EG][3],891,0,1782,89.1,0.0020
PieceValue[TWOKINGS_VARIANT][EG][4],1373,0,2746,137.3,0.0020
PieceValue[TWOKINGS_VARIANT][EG][5],2646,0,5292,264.6,0.0020
PieceValue[TWOKINGS_VARIANT][EG][6],780,0,1560,78,0.0020

@Nordlandia: Are you sure the games are independent enough, when you start them all from the same position? If Stockfish Variant does not randomize, it could be that you are basically playing the same game all the time (which ends in a draw), and that only occasionally another move is done at some point (because Stockfish happens to change move very close to a timeout that would force it to play a move), leading to two other games with low probability, one ending in a win, the other in a loss.

When you say 13 wins. was it always the KK side that won? The result reports 7 wins and 6 losses. Is this just because you were alternating colors? Results are easier to interpret when you don't alternate colors. Or, when you cannot disable such alternation, alternate the starting position, so that even games are played with a pair of black Kings, ad odd games with a pair of white Kings.

@HGMuller i had to abort 3+2 match because of repetition. All games were drawn. Maybe contempt is to be used in selfplay matches to avoid draw frequency. Kaufman encourages to use default contempt of 10 in K selfplay matches. Now since SF has updated contempt, maybe it's useful for selfplay藡?

Yes, i wish cutechess support alternate colors option.

Also i requested cutechess to implement _lock engine as white_ in engine matches.

https://github.com/cutechess/cutechess/issues/321

Late end-games tend to be drawish, (if nearly equal), not much can be done about that. But to prevent repetition. you can start every game from a different position.

I have to use EPD for thar right?

I don't know. I never used cute-chess. I don't know how you specify the start position now. With XBoard the start FEN would have to be in a file, and you can have 100 FENs in that file just as easily as you can have one.

SPSA/SF suggest the commoner is overvalued (but not by much)!
commoner

@ddugovic: my testing advocates the opposite. KK vs KN is not worse.

@Nordlandia I don't disagree; I'm just saying the commoner seems overvalued. I'll try some testing from 8/8/8/3n4/4k3/8/8/K6K w - - later (maybe even increasing the 50-move-rule parameter to 100; I think there's a parameter for that?)

Interesting position, clearly only KK can win.
Only one problem: cutechess adjudicate KK vs KN as draw by insufficient mating material.

Good point. I'll need to use -draw movecount=100 and -tbpieces 2 (running locally):
https://github.com/cutechess/cutechess/blob/master/projects/cli/res/doc/help.txt

OK, once I fixed cutechess I observed (tc=240/0.1+1):

[Event "?"]
[Site "?"]
[Date "2017.12.09"]
[Round "1"]
[White "Stockfish 091217 64 BMI2"]
[Black "Stockfish 091217 64 BMI2"]
[Result "1/2-1/2"]
[FEN "8/8/8/3n4/4k3/8/8/K6K w - - 0 1"]
[SetUp "1"]

1. Kb2 Ne3 2. Kc3 Nd5+ 3. Kb3 Nb6 4. Kg1 Kd3 5. Kb4 Kd4 6. Kb5 Nc4 7. Kc6 Ne5+
8. Kd6 Nf7+ 9. Kc7 Kc5 10. Kf2 Ne5 11. Ke2 Kd5 12. Kd2 Nc4 13. Kc3 Na3 14. Kb3
Nb5 15. Kd7 Kc5 16. Kb2 Nd6 17. Ke6 Nb5 18. Ke7 Kb4 19. Kc1 Kc4 20. Kb2 Na7
21. Ke6 Nb5 22. Ke5 Kd3 23. Kf4 Nd6 24. Kg4 Nc4+ 25. Kb3 Ne5 26. Kf4 Nc4 27. Kg4
Nb6 28. Kg3 Nd5 29. Kb2 Ne3 30. Kf4 Nd1+ 31. Ka3 Nc3 32. Kg5 Nd1 33. Kf6 Kc4
34. Ka2 Kc3 35. Ke7 Nb2 36. Ke6 Nd1 37. Ke7 Nb2 38. Ke6 Nd1 39. Kd6 Nb2 40. Kd5
Nd1 41. Kc5 Nf2 42. Kb1 Nh3 43. Kd5 Kb4 44. Ke4 Ng5 45. Kf5 Nh7 46. Kc2 Nf8
47. Kd3 Nd7 48. Kde4 Nc5+ 49. Kd5 Nd3 50. Kde4 Nc1 1/2-1/2

Then in cutechess I changed the 50-move rule to a 100-move rule, and in Stockfish disabled the 50-move rule, producing (tc=240/0.1+1):

[Event "?"]
[Site "?"]
[Date "2017.12.09"]
[Round "1"]
[White "Stockfish 091217 64 BMI2"]
[Black "Stockfish 091217 64 BMI2"]
[Result "1/2-1/2"]
[FEN "8/8/8/3n4/4k3/8/8/K6K w - - 0 1"]
[SetUp "1"]

1. Kb2 Ne3 2. Kc3 Kd5 3. Kd3 Nc4 4. Kg2 Ne5+ 5. Kc3 Nf7 6. Kf2 Ne5 7. Ke3 Nc6
8. Ked3 Kc5 9. Kc4+ Kd6 10. Kb5 Ne7 11. Kcc4 Ke6 12. Kbc5 Ke5 13. K5d4+ Kf6
14. Ke4 Ke6 15. Kb5 Ng6 16. Ke3 Kd5 17. Kb4 Ne7 18. Kd3 Nf5 19. Kc4+ Ke6 20. Kd3
Kd5 21. Kc4+ Ke6 22. Kbc3 Ne3 23. Kc5 Nd5+ 24. Kd2 Ke5 25. Ke2 Ke4 26. Kd2 Nf4
27. Kc3 Ne6 28. K5c4 Ke5 29. K3d3 Kf5 30. Kc2 Ke4 31. K2d3+ Kf5 32. Kc2 Ke4
33. K2c3 Ke5 34. K3b4 Nd4 35. Kbc5 Nf5 36. K4d5+ Kf6 37. Kdc6 Ke5 38. Kb4 Ne7
39. Kd7 Nd5+ 40. Kb5 Nf6 41. Kdc6 Ne4 42. Kc4 Nd2+ 43. Kd3 Nb3 44. Kc3 Nc1
45. Kd2 Nb3 46. Kc3 Nd4 47. Kc5 Nf5 48. K5c4 Nd6 49. Kd4+ Kf6 50. Kd5 Nf5
51. Kc5 Ne3 52. Kd6 Nf5 53. Kd7 Ke5 54. Kc4 Ne3+ 55. Kb4 Nd1 56. Kc4 Kf4 57. Kd4
Ne3 58. Kc7 Kf3 59. Kc6 Nd1 60. Kd7 Kg3 61. Ke6 Kf4 62. Kc5 Ke3 63. Kf5 Ke2
64. Kd4 Kd2 65. Kde5 Nc3 66. Kd4 Nd1 67. Kde5 Nc3 68. Kef4 Kc2 69. Ke3 Na4
70. Kd4 Nc3 71. Kfe5 Kd2 72. Kf6 Kc2 73. Kfe5 Kd2 74. Kf6 Kc2 75. Kf5 Kd2
76. Kc4 Nd1 77. Kd4 Nf2 78. Kfe5 Ke2 79. Kf4 Nd1 80. Kfe4 Kd2 81. Kf5 Nc3
82. Kfe5 Ne2+ 83. Kd5 Nc1 84. Kc4 Nd3 85. Kd6 Nf2 86. Kdc5 Ke2 87. K5d4 Ke1
88. Kcd5 Kd2 89. K5c5 Ke1 90. Ke3 Nd1 91. Kf4 Kd2 92. Ke5 Nc3 93. Kb4 Ne2
94. Kc5 Kd3 95. Kb4 Kd2 96. Kb5 Kc3 97. Kc5 Ng3 98. Kf4 Ne2 99. Ke3 Ng3
100. Kd4+ Kd2 1/2-1/2

So then I added a specialized endgame function, changed Position::non_pawn_material() to include the commoner, and produced (tc=240/0.1+1):

[Event "?"]
[Site "?"]
[Date "2017.12.09"]
[Round "1"]
[White "Stockfish 091217 64 BMI2"]
[Black "Stockfish 091217 64 BMI2"]
[Result "1/2-1/2"]
[FEN "8/8/8/3n4/4k3/8/8/K6K w - - 0 1"]
[PlyCount "200"]
[SetUp "1"]
[TimeControl "240/0.1+1"]
[Variant "twokings"]

1. Kb1 Ne3 {-0.71/3 0s} 2. Kb2 {+0.71/12 0.055s} Kd4 {-0.71/10 0.039s}
3. Kg1 {+0.75/14 0.068s} Nd5 {-0.75/15 0.16s} 4. Kb3 {+0.71/15 0.092s}
Nc3 {-0.75/17 0.085s} 5. Kg2 {+0.75/18 0.075s} Nb1 {-0.75/21 0.068s}
6. Kg3 {+0.75/24 0.26s} Nd2+ {-0.75/28 0.10s} 7. Kb4 {+0.75/26 0.071s}
Nb1 {-0.75/32 0.13s} 8. Kf2 {+0.75/30 0.13s} Ke4 {-0.75/27 0.15s}
9. Kc4 {+0.80/28 0.24s} Nd2+ {-0.75/27 0.16s} 10. Kc3 {+0.80/29 0.15s}
Nb1+ {-0.75/30 0.19s} 11. Kb2 {+0.80/30 0.18s} Nd2 {-0.80/31 0.23s}
12. Ke2 {+0.80/32 0.19s} Nf3 {-0.80/31 0.18s} 13. Kc3 {+0.80/34 0.22s}
Ne5 {-0.80/34 0.25s} 14. Kc2 {+0.80/35 0.24s} Kd4 {-0.80/33 0.20s}
15. Ked2 {+0.80/36 0.23s} Nf7 {-0.80/34 0.21s} 16. Kdd3+ {+0.80/28 0.21s}
Kd5 {-0.80/38 0.40s} 17. Kcd2 {+0.80/33 0.23s} Ne5 {-0.80/35 0.31s}
18. K3c3 {+0.80/36 0.24s} Nc4 {-0.80/39 0.34s} 19. Kd3 {+0.80/35 0.27s}
Na5 {-0.80/36 0.26s} 20. Kcd4+ {+0.80/36 0.26s} Kd6 {-0.80/40 0.27s}
21. K3e4 {+0.80/37 0.67s} Nb3+ {-0.80/33 0.32s} 22. Ke3 {+0.80/38 0.60s}
Na5 {-0.80/36 0.29s} 23. K3d4 {+0.80/41 0.32s} Nb3+ {-0.80/37 0.34s}
24. Kc3 {+0.80/39 0.31s} Nc5 {-0.80/34 0.30s} 25. Ke3 {+0.80/38 0.37s}
Nd7 {-0.80/37 0.28s} 26. Kcd4 {+0.84/39 0.56s} Nb8 {-0.80/40 0.31s}
27. Kc4 {+0.84/36 0.33s} Nc6 {-0.80/38 0.34s} 28. Ke4 {+0.84/39 0.30s}
Ne5+ {-0.80/38 0.30s} 29. Kb4 {+0.84/40 0.31s} Nc6+ {-0.80/39 0.30s}
30. Kb5 {+0.84/40 0.39s} Ne5 {-0.80/40 1.5s} 31. Kb4 {+0.84/44 0.33s}
Nc6+ {-0.80/43 0.35s} 32. Kb5 {+0.84/44 0.34s} Ne5 {-0.80/44 0.40s}
33. Kd4 {+0.84/36 0.36s} Nd7 {-0.80/43 0.31s} 34. Kbc4 {+0.84/35 0.38s}
Nb6+ {-0.80/41 0.29s} 35. Kb3 {+0.84/31 0.27s} Nd5 {-0.80/37 0.26s}
36. Kbc4 {+0.84/36 0.44s} Nb6+ {-0.80/43 0.34s} 37. Kb3 {+0.84/37 0.32s}
Kc6 {-0.80/38 0.28s} 38. Kbc3 {+0.80/34 0.64s} Nd5+ {-0.80/35 0.28s}
39. Kd3 {+0.80/33 0.25s} Nb6 {-0.80/40 0.23s} 40. K4e4 {+0.80/34 0.25s}
Na4 {-0.80/36 0.25s} 41. Kdd4 {+0.80/33 0.24s} Nb6 {-0.80/41 0.57s}
42. Kee5 {+0.80/39 0.53s} Kc7 {-0.80/39 0.46s} 43. Kf4 {+0.80/40 0.49s}
Kd6 {-0.80/38 0.58s} 44. Kg4 {+0.80/42 0.50s} Na4 {-0.80/39 0.60s}
45. Kf3 {+0.80/45 0.67s} Nc5 {-0.80/41 0.46s} 46. Kc4 {+0.80/40 0.53s}
Na4 {-0.80/41 0.46s} 47. Ke2 {+0.80/37 0.68s} Nc5 {-0.80/43 0.47s}
48. Ke3 {+0.80/39 0.73s} Na4 {-0.80/44 0.49s} 49. Kd2 {+0.80/37 0.59s}
Nc5 {-0.80/39 0.48s} 50. Ke1 {+0.80/40 0.46s} Ne6 {-0.80/44 0.49s}
51. Kf2 {+0.80/40 0.52s} Nc7 {-0.80/44 0.48s} 52. Ke3 {+0.84/39 0.40s}
Nd5 {-0.80/47 0.56s} 53. Ked3 {+0.80/42 0.75s} Nb6+ {-0.80/43 0.52s}
54. Kb5 {+0.84/43 0.56s} Nd7 {-0.80/43 0.52s} 55. Kdc4 {+0.80/43 0.67s}
Ne5 {-0.80/44 0.52s} 56. Kc3 {+0.80/43 0.49s} Ke6 {-0.80/42 0.57s}
57. Kc5 {+0.80/41 0.52s} Nd7 {-0.80/42 0.73s} 58. K5c4 {+0.80/43 0.68s}
Ne5 {-0.80/43 0.68s} 59. Kd4 {+0.80/40 0.50s} Kd6 {-0.80/45 0.68s}
60. Ke3 {+0.80/41 0.61s} Kd5 {-0.80/48 0.53s} 61. Kb3 {+0.80/41 0.79s}
Ng4 {-0.80/40 0.68s} 62. Kd3 {+0.80/37 0.54s} Ke6 {-0.80/38 0.55s}
63. Kd4 {+0.80/38 0.54s} Ne5 {-0.80/42 0.61s} 64. Ke4 {+0.80/42 0.56s}
Nd7 {-0.80/42 0.59s} 65. Kb4 {+0.80/40 0.60s} Kd6 {-0.80/44 1.3s}
66. Kd4 {+0.80/43 0.58s} Ne5 {-0.80/45 0.38s} 67. Ke3 {+0.80/47 0.70s}
Nc6+ {-0.80/42 0.63s} 68. Kc4 {+0.80/49 0.70s} Na5+ {-0.80/45 0.61s}
69. Kb5 {+0.80/47 0.78s} Nb3 {-0.80/49 0.80s} 70. Kb4 {+0.80/42 0.73s}
Nc5 {-0.80/47 0.82s} 71. Kd2 {+0.80/39 0.55s} Nb7 {-0.80/40 0.56s}
72. Kdc3 {+0.80/43 0.56s} Nc5 {-0.80/44 0.57s} 73. Kb5 {+0.80/47 0.69s}
Nd7 {-0.80/46 1.3s} 74. Kd3 {+0.80/41 0.72s} Nc5 {-0.80/47 0.38s}
75. Kc2 {+0.80/44 0.58s} Nb7 {-0.80/42 0.64s} 76. Kd3 {+0.80/46 0.70s}
Nc5 {-0.80/46 0.71s} 77. Kc2 {+0.80/47 0.73s} Ne6 {-0.80/42 0.65s}
78. Kc3 {+0.80/41 0.63s} Nc7+ {-0.80/39 0.69s} 79. Kc4 {+0.80/43 0.72s}
Nd5+ {-0.80/40 0.60s} 80. Kd3 {+0.80/37 0.63s} Nb6+ {-0.80/47 0.67s}
81. Kb5 {+0.80/52 0.66s} Nd7 {-0.80/45 0.70s} 82. Kd4 {+0.80/54 0.85s}
Ne5 {-0.80/49 0.83s} 83. Kc3 {+0.80/45 0.68s} Kd5 {-0.80/41 0.72s}
84. Kd2 {+0.80/39 0.70s} Nd7 {-0.80/41 0.67s} 85. Kc3 {+0.80/49 0.66s}
Ne5 {-0.80/42 0.62s} 86. Kd2 {+0.80/42 0.90s} Nc4 {-0.80/44 0.62s}
87. Kd3 {+0.80/44 0.64s} Nd6+ {-0.80/42 0.61s} 88. Kb4 {+0.80/41 0.66s}
Ne4 {-0.80/44 0.71s} 89. Ke3 {+0.80/44 0.71s} Nc5 {-0.80/46 0.93s}
90. Kd2 {+0.80/40 0.81s} Ne4 {-0.80/44 0.67s} 91. Ke3 {+0.80/45 0.79s}
Nc5 {-0.80/48 1.4s} 92. Kd2 {+0.80/44 0.91s} Ne4 {-0.80/47 0.68s}
93. Ke2 {+0.80/41 0.66s} Kd4 {-0.80/37 0.63s} 94. Kd1 {+0.80/45 1.0s}
Kd3 {-0.80/37 0.77s} 95. Kc1 {+0.80/40 0.73s} Nd2 {-0.80/40 0.64s}
96. Kb2 {+0.80/41 0.80s} Nf3 {-0.80/39 0.68s} 97. K2c3+ {+0.84/34 0.55s}
Ke4 {-0.80/40 0.82s} 98. Kc5 {+0.80/36 0.75s} Kf4 {-0.80/40 0.76s}
99. Kd5 {+0.80/38 0.80s} Ke3 {-0.80/39 0.74s} 100. Kdc4 {+0.80/38 0.67s}
Kf4 {-0.80/40 1.1s, Draw by hundred moves rule} 1/2-1/2

Implementing a 100-move rule (for evaluation) has similar effects (tc=240/0.1+1):

[Event "?"]
[Site "?"]
[Date "2017.12.09"]
[Round "1"]
[White "Stockfish 091217 64 BMI2"]
[Black "Stockfish 091217 64 BMI2"]
[Result "1/2-1/2"]
[FEN "8/8/8/3n4/4k3/8/8/K6K w - - 0 1"]
[PlyCount "200"]
[SetUp "1"]
[TimeControl "240/0.1+1"]
[Variant "twokings"]

1. Kb2 {+0.71/4 0s} Ke5 {-0.71/3 0s} 2. Kb3 {+0.71/12 0.081s}
Kd4 {-0.71/12 0.11s} 3. Kg2 {+0.75/15 0.083s} Nf4 {-0.71/16 0.14s}
4. Kf2 {+0.75/16 0.054s} Nd3 {-0.75/18 0.056s} 5. Kg3 {+0.75/20 0.081s}
Nc1+ {-0.75/19 0.099s} 6. Kc2 {+0.75/23 0.29s} Na2 {-0.75/25 0.10s}
7. Kf2 {+0.80/26 0.23s} Ke4 {-0.80/23 0.26s} 8. Ke2 {+0.80/24 0.087s}
Nb4+ {-0.80/28 0.17s} 9. Kd2 {+0.80/28 0.14s} Kd4 {-0.80/31 0.23s}
10. Kee3+ {+0.80/33 0.28s} Ke5 {-0.80/35 0.15s} 11. Kf3 {+0.80/35 0.27s}
Na2 {-0.80/32 0.16s} 12. Kde2 {+0.80/27 0.17s} Kd4 {-0.80/33 0.21s}
13. Kd2 {+0.80/33 0.20s} Kc4 {-0.80/31 0.19s} 14. Kde3 {+0.80/35 0.20s}
Nc1 {-0.80/35 0.20s} 15. Kd2 {+0.80/34 0.21s} Nb3+ {-0.80/37 0.22s}
16. Ke3 {+0.80/36 0.24s} Na1 {-0.80/38 0.26s} 17. Kd2 {+0.80/40 0.29s}
Nb3+ {-0.80/42 0.30s} 18. Ke3 {+0.80/40 0.24s} Na1 {-0.80/44 0.39s}
19. Kfe2 {+0.80/35 0.26s} Nc2 {-0.80/34 0.25s} 20. K3d2 {+0.80/35 0.35s}
Nd4 {-0.80/39 0.28s} 21. Ke3 {+0.80/35 0.29s} Nb5 {-0.80/30 0.26s}
22. Kc2 {+0.80/35 0.28s} Na3+ {-0.80/33 0.31s} 23. Kd2 {+0.80/37 0.33s}
Nb1+ {-0.80/35 0.32s} 24. Kc2 {+0.80/41 0.40s} Na3+ {-0.80/37 0.35s}
25. Kd2 {+0.80/43 0.45s} Nb1+ {-0.80/39 0.34s} 26. Ke2 {+0.80/38 0.33s}
Kc3 {-0.80/35 0.31s} 27. Kd1 {+0.80/39 0.29s} Kc4 {-0.80/38 0.31s}
28. Kde2 {+0.80/42 0.35s} Nc3+ {-0.80/40 0.30s} 29. Kf3 {+0.80/43 0.46s}
Nb1 {-0.80/40 0.32s} 30. Kfe4 {+0.80/39 0.34s} Na3 {-0.80/39 0.33s}
31. Kd2 {+0.80/40 0.33s} Nb1+ {-0.80/42 0.31s} 32. Ke3 {+0.80/42 0.28s}
Nc3 {-0.80/44 0.28s} 33. Kf3 {+0.80/44 0.36s} Nb1 {-0.80/43 0.30s}
34. Kee2 {+0.80/40 0.36s} Kd4 {-0.80/39 0.32s} 35. Ke3+ {+0.80/42 0.28s}
Kc3 {-0.80/41 0.31s} 36. Kd1 {+0.80/45 0.30s} Kc4 {-0.80/35 0.28s}
37. Kc1 {+0.80/38 0.28s} Na3 {-0.80/38 0.31s} 38. Kb2 {+0.80/35 0.25s}
Nb5 {-0.80/33 0.30s} 39. Kd2 {+0.80/35 0.27s} Kd5 {-0.80/35 0.56s}
40. Kd3 {+0.80/37 0.27s} Nd4 {-0.80/37 0.37s} 41. Kbc3 {+0.80/41 0.28s}
Nc6 {-0.80/38 0.50s} 42. Ke3 {+0.80/39 0.57s} Ne5 {-0.80/38 0.50s}
43. Kd4+ {+0.80/43 0.52s} Ke6 {-0.80/41 0.56s} 44. Kc5 {+0.80/36 0.48s}
Nd7 {-0.80/39 0.51s} 45. Kd4 {+0.80/40 0.56s} Ne5 {-0.80/44 0.60s}
46. Kc5 {+0.80/43 0.56s} Nd7 {-0.80/44 0.51s} 47. K5c4 {+0.80/41 0.52s}
Ne5 {-0.80/40 0.50s} 48. Kd4 {+0.80/42 0.49s} Kd6 {-0.80/42 0.46s}
49. Ke4 {+0.80/44 1.1s} Nc6 {-0.80/40 0.47s} 50. Kc4 {+0.80/45 0.48s}
Ne5+ {-0.84/39 0.59s} 51. Kb3 {+0.80/48 0.77s} Ke6 {-0.84/36 0.53s}
52. Kc2 {+0.80/34 0.53s} Nf7 {-0.84/34 0.54s} 53. Kc3 {+0.80/36 0.49s}
Ne5 {-0.84/39 0.56s} 54. Kcd4 {+0.80/41 0.56s} Nc6+ {-0.84/41 0.53s}
55. Kc5 {+0.80/43 0.50s} Ne5 {-0.84/45 0.50s} 56. Kd5+ {+0.84/33 0.48s}
Kf5 {-0.84/43 0.57s} 57. Kcd4 {+0.84/38 0.56s} Nf7 {-0.84/44 0.60s}
58. Kd3 {+0.84/37 0.78s} Kf4 {-0.84/41 0.58s} 59. K5e4+ {+0.84/36 0.53s}
Kg5 {-0.84/43 0.58s} 60. Kdd4 {+0.84/40 0.84s} Kf6 {-0.84/44 0.88s}
61. Ked5 {+0.84/41 0.54s} Ke7 {-0.84/36 0.49s} 62. K5c5 {+0.84/35 0.53s}
Ke6 {-0.84/41 0.64s} 63. Ke4 {+0.84/42 0.61s} Ne5 {-0.84/43 0.59s}
64. Kd5+ {+0.84/43 0.67s} Kf5 {-0.84/46 0.66s} 65. Kdd4 {+0.84/46 0.91s}
Nf3 {-0.84/41 0.62s} 66. Ke3 {+0.84/45 0.65s} Ng5 {-0.84/42 1.1s}
67. Kcd4 {+0.84/38 0.57s} Nf7 {-0.84/39 0.60s} 68. Kee4+ {+0.84/41 0.56s}
Kg6 {-0.84/42 0.58s} 69. Kee3 {+0.84/41 0.66s} Kf5 {-0.84/45 1.4s}
70. Kd5 {+0.84/42 0.78s} Kf6 {-0.84/43 2.5s} 71. Kee4 {+0.84/43 8.6s}
Kg6 {-0.84/44 0.62s} 72. Kd3 {+0.84/44 0.47s} Kg7 {-0.84/39 0.82s}
73. Kc3 {+0.84/38 0.52s} Kf6 {-0.84/47 0.58s} 74. Kcd4 {+0.84/46 0.80s}
Ke7 {-0.84/41 0.61s} 75. K4e4 {+0.84/38 0.55s} Kf6 {-0.84/44 0.64s}
76. Kf4 {+0.84/38 0.59s} Ng5 {-0.84/42 0.59s} 77. Ke3 {+0.84/43 0.66s}
Ne6 {-0.84/42 0.59s} 78. Kd6 {+0.84/41 0.51s} Nd8 {-0.84/42 0.62s}
79. Kf4 {+0.84/32 0.52s} Nf7+ {-0.84/41 8.8s} 80. Kd5 {+0.84/41 7.9s}
Nh6 {-0.84/38 0.74s} 81. Kd6 {+0.84/31 0.45s} Nf7+ {-0.84/37 7.4s}
82. Kc5 {+0.84/37 6.8s} Ke6 {-0.84/34 0.51s} 83. Ke3 {+0.80/33 0.62s}
Ne5 {-0.84/33 2.4s} 84. Ked4 {+0.84/33 5.8s} Nf3 {-0.75/32 6.1s}
85. Ke3 {+0.75/28 1.0s} Nh4 {-0.75/29 1.2s} 86. Kf2 {+0.75/26 0.52s}
Kd7 {-0.67/25 0.33s} 87. Kd5 {+0.75/25 0.30s} Kc7 {-0.67/24 0.28s}
88. Ke5 {0.00/24 5.1s} Ng6+ {0.00/23 2.7s} 89. Kf6 {0.00/29 0.37s}
Nf4 {0.00/41 1.0s} 90. Kf3 {0.00/31 0.30s} Nd3 {0.00/48 1.0s}
91. Ke2 {0.00/31 0.38s} Nb4 {0.00/51 1.0s} 92. Kd1 {0.00/33 0.32s}
Nc6 {0.00/53 1.1s} 93. Kc2 {0.00/36 0.32s} Nb4+ {0.00/44 0.49s}
94. Kb3 {0.00/38 0.36s} Na6 {0.00/51 0.41s} 95. Kc4 {0.00/41 0.33s}
Kb6 {0.00/36 0.36s} 96. Ke6 {0.00/44 0.34s} Nb8 {0.00/38 0.41s}
97. Kb3 {0.00/43 0.34s} Na6 {0.00/64 0.38s} 98. Ka2 {0.00/69 0.36s}
Kc7 {0.00/101 0.36s} 99. Ka1 {0.00/127 0.24s} Kd8 {0.00/127 0.029s}
100. Kb1 {0.00/127 0.019s} Nb4 {0.00/127 0.003s, Draw by hundred moves rule}
1/2-1/2

I still fail to understand how @Nordlandia tested KK versus KN given that cutechess would draw by adjudication (unless compiled from modified source), however it appears that we can't assume that a commoner is worth more than a knight (or even if it is, we can't assume that changing the numbers in the source code will produce a desirable effect; if there's a suggestion worth testing, by all means create a patch and submit it for testing).

A bit more experimentation progressed no further; maybe there isn't a forced mate?

[Event "?"]
[Site "?"]
[Date "2017.12.09"]
[Round "1"]
[White "Stockfish 091217 64 BMI2"]
[Black "Stockfish 091217 64 BMI2"]
[Result "1/2-1/2"]
[FEN "8/8/8/3n4/4k3/8/8/K6K w - - 0 1"]
[PlyCount "200"]
[SetUp "1"]
[TimeControl "240/0.1+0.1"]
[Variant "twokings"]

1. Kb2 {+0.63/3 0s} Ke5 {-0.63/4 0s} 2. Kg2 {+0.71/7 0.005s}
Ke4 {-0.71/9 0.014s} 3. Kb3 {+0.75/8 0.008s} Ne3 {-0.71/8 0.003s}
4. Kf2 {+0.75/9 0.007s} Ng4 {-0.75/11 0.021s} 5. Ke2 {+0.75/10 0.008s}
Ne5 {-0.75/8 0.005s} 6. Kc3 {+0.80/8 0.009s} Nf3 {-0.75/10 0.008s}
7. Kd3+ {+0.80/10 0.014s} Kf4 {-0.80/11 0.017s} 8. Kdc4 {+0.80/11 0.019s}
Ne1 {-0.80/12 0.013s} 9. K4d4 {+0.80/13 0.028s} Nf3 {-0.80/16 0.066s}
10. Kd5 {+0.80/14 0.009s} Ke3 {-0.80/16 0.015s} 11. Kdc4 {+0.80/15 0.015s}
Kf4 {-0.80/19 0.019s} 12. K4d3 {+0.80/16 0.019s} Ne5 {-0.80/19 0.016s}
13. Kd4 {+0.75/18 0.036s} Nf3 {-0.75/19 0.024s} 14. Kd5 {+0.75/19 0.026s}
Ke3 {-0.75/16 0.023s} 15. Kdc4 {+0.75/18 0.042s} Kf4 {-0.75/19 0.025s}
16. Kc5 {+0.84/18 0.052s} Ke4 {-0.75/20 0.028s} 17. K3c4 {+0.84/19 0.025s}
Ke3 {-0.75/19 0.040s} 18. K4d5 {+0.75/19 0.049s} Kd3 {-0.84/15 0.039s}
19. Kcd6 {+0.75/20 0.026s} Ke3 {-0.80/19 0.047s} 20. K6e6 {+0.75/21 0.025s}
Kf4 {-0.80/19 0.073s} 21. Kc4 {+0.75/22 0.060s} Ke3 {-0.80/21 0.042s}
22. Kcd5 {+0.75/23 0.021s} Kf4 {-0.80/21 0.019s} 23. Kc5 {+0.75/25 0.058s}
Ke4 {-0.80/24 0.057s} 24. Kd5+ {+0.75/21 0.026s} Kd3 {-0.80/23 0.018s}
25. Ke6 {+0.75/23 0.026s} Ng5 {-0.75/18 0.029s} 26. Kf5 {+0.75/20 0.028s}
Ne4+ {-0.71/19 0.051s} 27. Kd5 {+0.75/22 0.029s} Nc3+ {-0.71/18 0.029s}
28. Ke5 {+0.75/21 0.20s} Ne4 {-0.71/23 0.037s} 29. Kff4 {+0.75/23 0.023s}
Nc3 {-0.71/22 0.031s} 30. Kff5 {+0.75/24 0.025s} Ne4 {-0.71/26 0.037s}
31. Kff4 {+0.75/26 0.038s} Nc3 {-0.71/26 0.033s} 32. Kd6 {+0.71/19 0.035s}
Kd4 {-0.71/19 0.039s} 33. Ke5+ {+0.71/19 0.055s} Kd3 {-0.71/23 0.025s}
34. Kf4 {+0.71/23 0.037s} Ne4+ {-0.71/20 0.026s} 35. Kd5 {+0.67/18 0.035s}
Nc3+ {-0.71/22 0.026s} 36. Ke6 {+0.67/17 0.035s} Ne4 {-0.71/22 0.023s}
37. Kfe5 {+0.67/19 0.026s} Nc3 {-0.71/25 0.035s} 38. Kf7 {+0.67/18 0.023s}
Ne2 {-0.71/22 0.023s} 39. Kg7 {+0.67/17 0.036s} Nc3 {-0.71/26 0.050s}
40. Kg6 {+0.67/18 0.025s} Ne4 {-0.71/25 0.014s} 41. Kf7 {+0.67/21 0.071s}
Nc3 {-0.71/27 0.048s} 42. Kg8 {+0.67/23 0.042s} Nb1 {-0.71/29 0.046s}
43. Kf7 {+0.67/24 0.043s} Nc3 {-0.71/29 0.046s} 44. Kg8 {+0.67/25 0.056s}
Nb1 {-0.71/23 0.045s} 45. Kh8 {+0.67/23 0.050s} Nd2 {-0.71/25 0.046s}
46. Kg7 {+0.67/25 0.046s} Ne4 {-0.71/27 0.053s} 47. Kh8 {+0.67/27 0.044s}
Nd2 {-0.71/29 0.050s} 48. Kh7 {+0.67/22 0.057s} Ne4 {-0.71/27 0.049s}
49. Kg6 {+0.67/24 0.052s} Nd2 {-0.71/29 0.060s} 50. Kd5 {+0.75/22 0.051s}
Ne4 {-0.71/29 0.052s} 51. Kf5 {+0.67/23 0.064s} Nc3+ {-0.71/28 0.064s}
52. Ke6 {+0.67/22 0.062s} Ne4 {-0.71/27 0.056s} 53. Kee5 {+0.67/24 0.047s}
Nc3 {-0.71/29 0.058s} 54. Kg6 {+0.67/23 0.051s} Ne4 {-0.71/33 0.068s}
55. Kh7 {+0.67/28 0.067s} Nd2 {-0.71/29 0.050s} 56. Kg7 {+0.67/28 0.11s}
Nc4+ {-0.71/27 0.055s} 57. Kf4 {+0.71/22 0.13s} Nd6 {-0.71/25 0.058s}
58. Kg6 {+0.71/23 0.046s} Ne4 {-0.71/28 0.056s} 59. Kf3 {+0.71/23 0.048s}
Nd2+ {-0.71/23 0.052s} 60. Kf4 {+0.71/25 0.058s} Ne4 {-0.71/32 0.059s}
61. Kf3 {+0.71/28 0.077s} Nd2+ {-0.71/29 0.061s} 62. Kf2 {+0.71/30 0.057s}
Ne4+ {-0.71/28 0.074s} 63. Ke1 {+0.71/30 0.053s} Nd6 {-0.71/29 0.054s}
64. Kd1 {+0.71/28 0.054s} Ne4 {-0.71/24 0.062s} 65. Kc1 {+0.71/29 0.060s}
Kd4 {-0.71/25 0.054s} 66. Kc2 {+0.71/26 0.055s} Nd6 {-0.71/27 0.062s}
67. Kd2 {+0.71/30 0.060s} Ne4+ {-0.71/29 0.062s} 68. Ke2 {+0.71/33 0.063s}
Nc3+ {-0.71/31 0.055s} 69. Kf3 {+0.71/29 0.062s} Kd3 {-0.71/33 0.074s}
70. Kg5 {+0.71/28 0.059s} Ne4 {-0.71/27 0.083s} 71. Kgg4 {+0.71/30 0.072s}
Nd2+ {-0.71/32 0.062s} 72. Kf4 {+0.71/29 0.064s} Ne4 {-0.71/35 0.067s}
73. Kff3 {+0.71/32 0.067s} Nd2+ {-0.71/37 0.067s} 74. Kf4 {+0.71/33 0.059s}
Ne4 {-0.71/37 0.058s} 75. Ke5 {+0.71/31 0.063s} Nd2 {-0.71/32 0.069s}
76. Kef5 {+0.71/30 0.063s} Ne4 {-0.71/35 0.067s} 77. Kf3 {+0.71/33 0.075s}
Nd2+ {-0.71/36 0.071s} 78. Kf2 {+0.71/33 0.062s} Nc4 {-0.71/28 0.068s}
79. Ke1 {+0.71/28 0.081s} Ne3 {-0.71/30 0.070s} 80. Kg6 {+0.71/28 0.057s}
Nc4 {-0.71/27 0.060s} 81. Kd1 {+0.71/31 0.061s} Nd2 {-0.71/30 0.065s}
82. Kf5 {+0.71/30 0.061s} Nb1 {-0.71/26 0.077s} 83. Kc1 {+0.71/30 0.069s}
Nd2 {-0.71/31 0.34s} 84. Kg6 {+0.71/32 0.059s} Ne4 {-0.71/31 0.063s}
85. Kb1 {+0.71/27 0.058s} Nd2+ {-0.71/28 0.059s} 86. Ka1 {+0.64/29 0.93s}
Ke3 {-0.71/25 0.058s} 87. Kf5 {+0.71/21 0.13s} Kd4 {-0.71/26 0.92s}
88. Kb2 {+0.71/22 0.034s} Nc4+ {-0.71/18 0.050s} 89. Kc1 {+0.71/23 0.78s}
Ne3 {-0.71/22 0.77s} 90. Kf4 {+0.71/20 0.058s} Ng2 {-0.63/18 0.17s}
91. Kg3 {+0.69/19 0.66s} Ne3 {-0.63/17 0.11s} 92. Kf3 {+0.08/16 0.33s}
Nc4 {-0.08/16 0.49s} 93. Kd1 {0.00/14 0.061s} Ne5 {0.00/16 0.13s}
94. Kfe2 {0.00/20 0.088s} Kd5 {0.00/28 0.11s} 95. Kdd2 {0.00/18 0.024s}
Kd6 {0.00/31 0.11s} 96. Kc3 {0.00/22 0.035s} Nc6 {0.00/32 0.036s}
97. Kd1 {0.00/26 0.040s} Ne5 {0.00/27 0.040s} 98. Kb3 {0.00/31 0.039s}
Nc6 {0.00/35 0.039s} 99. Kc1 {0.00/46 0.037s} Nd4+ {0.00/56 0.039s}
100. Kbb2 {0.00/67 0.040s} Nc2 {0.00/127 0.003s, Draw by hundred moves rule}
1/2-1/2

I'm not saying commoner is stronger than knight. What i'm saying based on my testing is that commoner is on par knights value in endgame. Knight value: 838 Commoner: +/- 800 !?

Note that Nordlandia tested KK vs KN in the presense of many Pawns. KCKN with a normal Commoner is know to be a general draw from end-game tables, (and the part-time royalty is unlikely to make any difference), but so is KRKN. So this doesn't tell you a lot about the value. End-games without Pawns are always very drawish. They are also very rare. Usually each side still has 3 or 4 Pawns, by the time you get down to a single piece each. So how the piece does without Pawns hardly affects the piece value.

The slightly negative evaluation in the position with pawns is actually not caused by the piece values (including the piece-square tables), but by the quadratic material imbalance bonuses, see below. Adding the king to the material imbalance arrays (as for antichess and horde chess) and tuning those values might be worth a try.

setoption name UCI_Variant value twokings
position fen 1n2k3/pppppppp/8/8/8/8/PPPPPPPP/3KK3 w - - 0 1
d
eval
info string variant twokings startpos rnbqkknr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKKNR w KQkq - 0 1

 +---+---+---+---+---+---+---+---+
 |   | n |   |   | k |   |   |   |
 +---+---+---+---+---+---+---+---+
 | p | p | p | p | p | p | p | p |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 | P | P | P | P | P | P | P | P |
 +---+---+---+---+---+---+---+---+
 |   |   |   | K | K |   |   |   |
 +---+---+---+---+---+---+---+---+

Fen: 1n2k3/pppppppp/8/8/8/8/PPPPPPPP/3KK3 w - - 0 1
Key: 3DF2870F8AC0B7D6
Checkers: 
      Eval term |    White    |    Black    |    Total    
                |   MG    EG  |   MG    EG  |   MG    EG  
----------------+-------------+-------------+-------------
       Material |   ---   --- |   ---   --- |  0.14  0.31 
      Imbalance |   ---   --- |   ---   --- | -0.66 -0.66 
          Pawns |   ---   --- |   ---   --- |  0.00  0.00 
        Knights |  0.00  0.00 |  0.03 -0.06 | -0.03  0.06 
        Bishops |  0.00  0.00 |  0.00  0.00 |  0.00  0.00 
          Rooks |  0.00  0.00 |  0.00  0.00 |  0.00  0.00 
         Queens |  0.00  0.00 |  0.00  0.00 |  0.00  0.00 
       Mobility |  0.00  0.00 | -0.04 -0.12 |  0.04  0.12 
    King safety |  1.03 -0.07 |  1.03 -0.07 |  0.00  0.00 
        Threats |  0.00  0.00 |  0.00  0.00 |  0.00  0.00 
   Passed pawns |  0.00  0.00 |  0.00  0.00 |  0.00  0.00 
          Space |  0.00  0.00 |  0.00  0.00 |  0.00  0.00 
     Initiative |   ---   --- |   ---   --- |  0.00 -0.10 
----------------+-------------+-------------+-------------
          Total |   ---   --- |   ---   --- | -0.51 -0.27 

Total Evaluation: -0.19 (white side)

I might have found a bug with the Two Kings game phase calculation, among other things: https://github.com/ddugovic/Stockfish/commit/e7caa7a3a2700379007314355181c5b585abc934#diff-760a56b9dcfc15bf67577d7d6a273fb9R610

Do you know what the bug does?

The bug causes:

  • game phase calculation does not consider commoner(s)
  • endgame scaling factor does not consider commoner(s)
  • king safety/threat does not consider commoner(s)
  • space evaluation does not consider commoner(s)
  • endgame tablebase probe does not consider commoner(s)
  • razoring, futility pruning, and shallow depth pruning do not consider commoner(s)
  • endgame tablebase probe does not consider commoner(s)

Comment: that's fine if EGTB is not eligible before both commoners is captured and removed from the board, as mentioned earlier in this thread.

Sure, but this thread didn't define what is an "eligible variant", and the bug does do this, and you asked what it does... and it seems there are reasons to fix it.

It's true that Two Kings tablebases haven't yet been compiled, but if antichess tablebases can exist then I see no reason why Two Kings tablebases couldn't also exist.

5-men two kings syzygy is indeed possible. The question is whether Ronald De Man is interested in generating them. If so generator has to be modified. He'll working on DTM syzygy for the time being.

5-men egtb(s) is small and fits inside RAM. 5-men is worth about 5-7 elo improvement.

Perhaps once https://github.com/syzygy1/Rustfish matures (or perhaps it has already?) I'll fork it and address this issue in Rust...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

niklasf picture niklasf  路  10Comments

ppigazzini picture ppigazzini  路  14Comments

Vinvin20 picture Vinvin20  路  9Comments

Nordlandia picture Nordlandia  路  13Comments

ppigazzini picture ppigazzini  路  8Comments