@Daniel: NebiyuChess and large Shogi variants

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

@Daniel: NebiyuChess and large Shogi variants

Post by hgm »

I got the following idea: the large-board Shogi variants, such as Chu Shogi are generally played without drops. Are such games within the power of Nebiyu Chess?

The only problem I could see that makes Chu Shogi more than just a Chess variant with some weird-moving pieces, is that some of the pieces (e.g. Lion) have the power to do two moves per turn. This means they could capture 'en passant' by capturing in the first leg, and moving away (even back to the from-square) on the second leg. They could even play captures in both legs, capturing two pieces in one turn. This is un-chesslike, and I can imagine a Chess-variant engine not being able to handle it.

However, a simple kludge could be to treat the turn indeed as two plies, suppressing the stm change. If the first leg captures something, the engine could call Search without stm change, and a special flag (comparable to an e.p. flag) that would force the move generator to only generate moves with the just-moved piece, for the second leg. This would break the odd-even color alteration of the ply levels, but I could not see any problems with that. (E.g. in testing for repetition, you would never have to go past the double ply, because the first leg was a capture.)

For some of the still bigger Shogi variants the situation is less favorable: these include a piece ('Fire Demon') that can capture all enemies in a 3x3 target area (a bit like in Atomic Chess). This probably requires NebiyuAlien.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: @Daniel: NebiyuChess and large Shogi variants

Post by Daniel Shawul »

hgm wrote:I got the following idea: the large-board Shogi variants, such as Chu Shogi are generally played without drops. Are such games within the power of Nebiyu Chess?

The only problem I could see that makes Chu Shogi more than just a Chess variant with some weird-moving pieces, is that some of the pieces (e.g. Lion) have the power to do two moves per turn. This means they could capture 'en passant' by capturing in the first leg, and moving away (even back to the from-square) on the second leg. They could even play captures in both legs, capturing two pieces in one turn. This is un-chesslike, and I can imagine a Chess-variant engine not being able to handle it.

However, a simple kludge could be to treat the turn indeed as two plies, suppressing the stm change. If the first leg captures something, the engine could call Search without stm change, and a special flag (comparable to an e.p. flag) that would force the move generator to only generate moves with the just-moved piece, for the second leg. This would break the odd-even color alteration of the ply levels, but I could not see any problems with that. (E.g. in testing for repetition, you would never have to go past the double ply, because the first leg was a capture.)

For some of the still bigger Shogi variants the situation is less favorable: these include a piece ('Fire Demon') that can capture all enemies in a 3x3 target area (a bit like in Atomic Chess). This probably requires NebiyuAlien.
I think the code can handle it if I make some modification. I have made major changes to alpha-beta ,evaluation, and other places to handle multiple players. It is hard even to determine who won the game when a terminal position is reached. However for this case, it is only one piece that has such behavior so that is a problem. Maybe I can generate combo moves (1st & 2nd move combined) to handle it like a regular variant. I forgot what the reason was why one method of treating combo moves that way was preferred over the other. Games like arimaa and this shogi variant has pieces that make multiple moves in a turn. That was my next goal before I got busy with something else. I will try to modify the code to handle such kind of games.