Oops I forgot to replace the alien.ini in the current package which misses a parameter to indicate minishogi_style_repeat. So please download again and send both alien.ini and NebiyuAlien. https://dl.dropboxusercontent.com/u/55295461/Nebiyu.zip
I also needed to rename minishogi to 5x5+5_shogi in alien.ini so that it works with the mini-Shogi package (v4.7.2). I have already done that in the new package. Edit Give me a second to check the drop issue. I was sure I fixed that one. Edit 2 It is now fixed, please download again. I forgot to rename the Nebiyu.exe to NebiyuAlien.exe
OK, I suspected a new parameter would be needed, but I compared the ini files, and found none. So I was using the 1.45 ini file, modified by me. Note that I also needed to change the pieceToChar string for the WinBoard development versions to play it properly. (It could be that 4.7.2 still ignores the setup command, though.) So what I used in 1.4.5 for game definition was this:
variant 5x5+5_shogi shogi 2
5 5 5
.*PpKkGgSsRrBbUuOoHhIi
rbsgk/4p/5/P4/KGSBR[-] w - - 0 1
#PNBRQFEACWMOHIJGDVLSUKpnbrqfeacwmohijgdvlsuk
P.BR.S...G.+.++.+....Kp.br.s...g.+.++.+....k
P 100 wfuhyo
p 100 bfuhyo
K 5000 king
k 5000 king
G 600 wgoldgeneral
g 600 bgoldgeneral
S 500 wsilvergeneral
s 500 bsilvergeneral
R 600 rook
r 600 rook
B 500 bishop
b 500 bishop
U 600 wgoldgeneral
u 600 bgoldgeneral
O 900 dragon
o 900 dragon
H 900 dragonhorse
h 900 dragonhorse
I 600 wgoldgeneral
i 600 bgoldgeneral
18 5 5 8
P 1 I 5 5
p 1 i 5 5
S 1 U
s 1 u
R 1 O
r 1 o
B 1 H
b 1 h
228 2
In the newer WinBoard versions the + signs in the pieceToCharTable are essential to allow promotion of the non-Pawn base type (11 positions earlier in the table), and to accept and print '+' as promotion suffix rather than =H or =D, and use a '+' prefix to the base-type ID in SAN moves with the piece (e.g. +Be3), as is common in Shogi notation.
variant 5x5+5_shogi shogi 2
5 5 5
.*PpKkGgSsRrBbUuOoHhIi
rbsgk/4p/5/P4/KGSBR[-] w - - 0 1
#PNBRQFEACWMOHIJGDVLSUKpnbrqfeacwmohijgdvlsuk
P.BR.S...GOI..HU..L..Kp.br.s...goi..hu..l..k
P 100 wfuhyo
p 100 bfuhyo
K 5000 king
k 5000 king
G 600 wgoldgeneral
g 600 bgoldgeneral
S 500 wsilvergeneral
s 500 bsilvergeneral
R 600 rook
r 600 rook
B 500 bishop
b 500 bishop
U 600 wgoldgeneral
u 600 bgoldgeneral
O 900 dragon
o 900 dragon
H 900 dragonhorse
h 900 dragonhorse
I 600 wgoldgeneral
i 600 bgoldgeneral
18 5 5 8
P 1 I 5 5
p 1 i 5 5
S 1 U
s 1 u
R 1 O
r 1 o
B 1 H
b 1 h
480 2 <-------
I noticed that Nebiyu has difficulties winning with white. Somehow it looses it all after accumulating some material. All its wins almost always come when playing with black. I suspect it is because of the repetition rule that penalizes white for repeating. Do you also observe the same with shokidoki when playing with other opponents than Nebiyu?
I am not sure about use of '+' sign to indicate the promoted piece. You have U, O, H and I in the piece defintion but not in the setup. It should be able to print the a promotion move with a +. Setting up a position with promoted pieces will be broken however, because all promoted pieces have a '+' as their piece character.
I noticed that Nebiyu has difficulties winning with white. Somehow it looses it all after accumulating some material. All its wins almost always come when playing with black. I suspect it is because of the repetition rule that penalizes white for repeating. Do you also observe the same with shokidoki when playing with other opponents than Nebiyu?
I think the cause of this maybe that black is finding ways to make a repeatition. Currently I return after just one repeation inside tree to award black the win!! Maybe I should wait for two repreations or award only the wind when white itself repeats the position. What do you for this ? Please wait till I fix this
Edit Indeed this seems to have an effect! I got 2 wins with white after waiting for 2 repeatitions before assigining loss for white (sente) inside the tree. I will try to check for repeatitions only after white moves, i.e every 2 plies for the same effect.
Well, I tested the version you mentioned two postings ago, and it seems to run wel. Indeed I changed the 228 into 480 in the alien.ini I was using before, and already sent that with it to Takeshi Ito, with instructions how to replace.
In Shokidoki I do reward win or loss on the first repeat. But I suppress awarding a win in the root (because it might not be a four-fold repeat yet; I don't keep track of that). It should not be very harmful when black always plays for a repeat, because he thinks the score will be +INF, though. (As long as he doesn't claim prematurely.) It is true that there might be a better move that you miss this way, but you will likely get a second chance to play it.
I don't think it should ever matter for white. If he sees the repeat coming in the tree, he will avoid it in the best way he can. The second time you are in the same position will not provide an easier way out of it than the first time.
About the pieceToChar line in alien.ini:
I understood that this is only used for sending to WinBoard in the setup command, and has no effect on Nebiyu's internal operation. Setting up of positions through 'setboard' should not occur in this tourney.
If WinBoard will send a FEN, it will use +B for promoted Bishop, etc. (I.e. if it finds a + in the pieceToCharTable, it will use the piece ID of the demoted piece, prefixed with + in FEN and SAN.) This is the standard for Shogi FENs, and I saw no reason to use a non-standard way in WinBoard. If Nebiyu doesn't understand that, but requires separate letters, then its processing of setboard commands shoud be considered broken. If a piece is not defined as + in the WinBoard pieceToChar table it will not be demoted to the base type on capture. As a result there would be no room for it in the holdings, which would cause automatic demotion to Pawn, which is not what we want in Shogi (but was needed for Crazyhouse).
Btw, you complained above that Shogi has so many special rules. I won't argue with that, but just want to point out that the rule that you cannot drop Pawns and Lances on last rank, and Knights on the last two ranks, is not really special to Shogi. It follows from the general rule, adhered to by almost all Chess variants, that you are not allowed to put pieces in a place where they would not be able to move even on an empty board. So in principle, knowing how pieces move, you could determine during game-definition load on which squares they are not allowed. This usually means that promotion on such squares is mandatory (as in Chess for Pawns), and that dropping is forbidden there. Crazyhouse has the extra rule (for no real reason) that Pawns can also not be dropped on the first rank.
I don't think it should ever matter for white. If he sees the repeat coming in the tree, he will avoid it in the best way he can. The second time you are in the same position will not provide an easier way out of it than the first time.
Yes it shouldn't make a difference. I have thought about this before but every time I see nebiyu having difficulty to win with white, somehow I treat it as a new problem. I guess that it should learn to take advantage of the tempo when playing with white, which other positional engines can exploit, to start winning with white consistently.
If Nebiyu doesn't understand that, but requires separate letters, then its processing of setboard commands shoud be considered broken. If a piece is not defined as + in the WinBoard pieceToChar table it will not be demoted to the base type on capture.
Again, I forgot about a problem I dealt with. Nebiyu has code to change '+' to promoted piece so it is ok as it is.
Btw, you complained above that Shogi has so many special rules. I won't argue with that, but just want to point out that the rule that you cannot drop Pawns and Lances on last rank, and Knights on the last two ranks, is not really special to Shogi. It follows from the general rule, adhered to by almost all Chess variants, that you are not allowed to put pieces in a place where they would not be able to move even on an empty board. So in principle, knowing how pieces move, you could determine during game-definition load on which squares they are not allowed. This usually means that promotion on such squares is mandatory (as in Chess for Pawns), and that dropping is forbidden there. Crazyhouse has the extra rule (for no real reason) that Pawns can also not be dropped on the first rank.
I am going to handle this through piece square tables. Since I calculate piece_values + piece_square_tables from mobility of pieces for alien games, they both get a value of 0. This will avoid it from putting a piece there, but it can play it when that is the only legal move. Or I could do it as you said to make it default that droping a piece where pieces can not move is illegal.
Indeed, I think that you should explicitly forbid it (and make it cause mandatory promotion). Because a zero score, or even a negative one, could still be attractive, when it is the only way to block a check or attack on a more valuable piece that otherwise would be lost. You can never know what the score of other legal moves is that it is compared against. (Setting a score of -INF should be safe, though.)
variant 5x5+5_shogi shogi 2
5 5 5
.*PpKkGgSsRrBbUuOoHhIi
rbsgk/4p/5/P4/KGSBR[-] w - - 0 1
#PNBRQFEACWMOHIJGDVLSUKpnbrqfeacwmohijgdvlsuk
P.BR.S...G++..++..L..Kp.br.s...g++..++..l..k
P 100 wfuhyo
p 100 bfuhyo
K 5000 king
k 5000 king
G 600 wgoldgeneral
g 600 bgoldgeneral
S 500 wsilvergeneral
s 500 bsilvergeneral
R 600 rook
r 600 rook
B 500 bishop
b 500 bishop
U 600 wgoldgeneral
u 600 bgoldgeneral
O 900 dragon
o 900 dragon
H 900 dragonhorse
h 900 dragonhorse
I 600 wgoldgeneral
i 600 bgoldgeneral
18 5 5 8
P 1 I 5 5
p 1 i 5 5
S 1 U
s 1 u
R 1 O
r 1 o
B 1 H
b 1 h
480 2