New WB engine: HaChu 0.0

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

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

New WB engine: HaChu 0.0

Post by hgm »

My latest engine project has seen 'first light', which seems a good time for a first release. It is called HaChu, and this is version 0.0. It plays absolutely awful, because there is almost nothing in it yet that could make it play good. (Fixed-depth full-width search, QS limited to 2 ply, no hash / killer / history, only eval material + awful PST.) But it plays!

Oh, and the only thing it plays so far is Chu Shogi ('variant chu'). Eventually it should also play the variants dai, dada, maka, tai and tenjiku, use an incrementally updated attack map, use NMP, LMR, check extension, hash, killer, unlimited-depth QS, mobility eval, different PST for white and black taking account of promotability, game-stage-dependent evaluation. So it will keep me busy for a while.

I bundled it with a version of WinBoard Alien Edition (so that is a pretty old one compared to 4.6.2), specially adapted to support the above-mentioned variants (although 'chu' is the only one that can be selected through the menu). I picked the Alien edition because of its ability to enter double-moves (using Ctrl) and turn passing (by clicking the clock), both of which are needed in Chu Shogi. It is equiped with the WB highlight feature and does move-legality checking, so you can play it with WB legality testing off for the most accurate 'highlight dragging'(indicating the target squares). With legality-testing on WB knows the rules only approximately (but will never refuse anything that is legal).

downloads
bundle: http://hgm.nubati.net/WinBoard-Chu.zip (WinBoard Alien, winboard.ini file, hachu.exe)
engine: http://hgm.nubati.net/hachu.exe

Image
diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: New WB engine: HaChu 0.0

Post by diep »

hgm wrote:My latest engine project has seen 'first light', which seems a good time for a first release. It is called HaChu, and this is version 0.0. It plays absolutely awful, because there is almost nothing in it yet that could make it play good. (Fixed-depth full-width search, QS limited to 2 ply, no hash / killer / history, only eval material + awful PST.) But it plays!

Oh, and the only thing it plays so far is Chu Shogi ('variant chu'). Eventually it should also play the variants dai, dada, maka, tai and tenjiku, use an incrementally updated attack map, use NMP, LMR, check extension, hash, killer, unlimited-depth QS, mobility eval, different PST for white and black taking account of promotability, game-stage-dependent evaluation. So it will keep me busy for a while.

I bundled it with a version of WinBoard Alien Edition (so that is a pretty old one compared to 4.6.2), specially adapted to support the above-mentioned variants (although 'chu' is the only one that can be selected through the menu). I picked the Alien edition because of its ability to enter double-moves (using Ctrl) and turn passing (by clicking the clock), both of which are needed in Chu Shogi.

downloads
bundle: http://hgm.nubati.net/WinBoard-Chu.zip (WinBoard Alien, winboard.ini file, hachu.exe)
engine: http://hgm.nubati.net/hachu.exe

Image
hi,

Impressive boardsize 12x12 with that many pieces. Reminds me of a kind of Chinese chess, but then at a bigger board. Could be wrong though.

Isn't the most interesting thing to accurately measure how many distinct people actually play games till someone has won in this game?

Quite some years ago i programmed several engines for several games that get played very little. After having put in a lot of work, no one played the games!

A note on big board sizes with many different pieces. It changes the game. In a statistical game i produced an engine for recently, i had thought i would need to put in a new form of search, say similar to monte carlo, but then my own way of implementing that (so without too much random idiocy, as the search already produces plenty of selective deeper searched lines which already produces a kind of randomness, be it careful chosen randomness).

However after having programmed a search of 1 ply + advanced quiescencesearch i already noticed that i sometimes lost games myself.

I have to do really a lot of effort to not lose it 'by accident'. A FM losing from a 1 ply search. Maybe if you're used to lose everything in your life you don't find that especially weird, but that's what actually happens quickly in these games.

Just the quiescencesearch starts to get really important.

And if i may say so also the search before that. In some very old Diep version what i did do after normal search is having 7 plies of selective search prior to jumping into quiescencesearch.

Even todays Diep version has that, though it's simply no longer or very seldom using up plies of that selective search. It's more 'by accident' now than deliberate form of search.

Now of course usually you don't make up plies from that, yet in games like this, those selective plies are very deadly as it picks up tactics and the first few plies of search picking those up are really important.

So i'm guessing that even with a very small search you'll have to search quite some on this planet to find some people who can beat a small engine; provided you gambled the material values and piece square tables pretty ok.
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: New WB engine: HaChu 0.0

Post by hgm »

It seems that only very few people play this game. And that is a shame, because my first impression is that, despite the fact that it is over 660 years old, it is really a quality game. It is at the end of an evolution, derived from not-so-hot games on even bigger boards. But a lot of thought obviously has gone into 'streamlining' these games, culminating in Chu Shogi. They kicked out the weakest, uninteresting pieces and shrunk the board to make it a fast-pace game. The weak pieces that are left can all promote to something strong. (E.g. a Gold General, which is basically a handicapped (non-royal) King, promotes to Rook upon entering the enemy camp (last 4 ranks).) The highly mobile sliders start directly behind the Pawns, for a violent clash right from the beginning. The Queen is only the second-strongest piece (Lion), and a special rule is in force to prevent direct or first-order indirect exchange of the Lions, so they stay in play quite long.

The fact that the traditional Japanes equipment for this game is unpalatable for westerners no doubt greatly contributes to the low number of players. The depicted 'culture neutral' and highly mnemonic piece representation should cure that, however.

Btw, the same rule as applied for Lion exchanges in Chu Shogi could also be applied to create an interesting variant of Chess, as follows:

0) All rules are exactly as in standard Chess, except:
1) Q x Q is only allowed if the Q stand next to each other, or if the captured Q is unprotected.
2) When any other piece captures a Queen, the opponent is not allowed to do the same on the next ply.
diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: New WB engine: HaChu 0.0

Post by diep »

hgm wrote:It seems that only very few people play this game. And that is a shame, because my first impression is that, despite the fact that it is over 660 years old, it is really a quality game. It is at the end of an evolution, derived from not-so-hot games on even bigger boards. But a lot of thought obviously has gone into 'streamlining' these games, culminating in Chu Shogi. They kicked out the weakest, uninteresting pieces and shrunk the board to make it a fast-pace game. The weak pieces that are left can all promote to something strong. (E.g. a Gold General, which is basically a handicapped (non-royal) King, promotes to Rook upon entering the enemy camp (last 4 ranks).) The highly mobile sliders start directly behind the Pawns, for a violent clash right from the beginning. The Queen is only the second-strongest piece (Lion), and a special rule is in force to prevent direct or first-order indirect exchange of the Lions, so they stay in play quite long.

The fact that the traditional Japanes equipment for this game is unpalatable for westerners no doubt greatly contributes to the low number of players. The depicted 'culture neutral' and highly mnemonic piece representation should cure that, however.

Btw, the same rule as applied for Lion exchanges in Chu Shogi could also be applied to create an interesting variant of Chess, as follows:

0) All rules are exactly as in standard Chess, except:
1) Q x Q is only allowed if the Q stand next to each other, or if the captured Q is unprotected.
2) When any other piece captures a Queen, the opponent is not allowed to do the same on the next ply.
I'm no expert in old fashionned shogi, i doubt any Japanese would ever pay a westerner to produce a quality engine / interface for it.

What i do notice is that the way how you represent the pieces graphicallly is not very attractive. Also the ugly green colors of the board you should change. I remember mailing that to tim mann already 20 years ago, but you're in the position to do that.

My life as a chessplayer i played on wood. Same for go players. In c ontradiction to the go players, chessplayers sit luxurious. The go players for important matches sit on stamped clay, as i understand, without much of a support for their legs.

Yet wood has a specific color and playing on a screen in a different color is something i'm never gonna do unpaid :)
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: New WB engine: HaChu 0.0

Post by hgm »

Well, the colors are user-configurable, so if you don't like these, there are 16 million others to choose from. But even more importantly, any user-supplied bitmap can be used to cut board-squares from. The standard WinBoard / XBoard install actually comes like this:

Image

You see: wood! 8-)

But the board texture blows up the image files enormously as it is virtually uncompressible. So when I want to upload screenshots of new features, I usually switch it off...
diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: New WB engine: HaChu 0.0

Post by diep »

hgm wrote:Well, the colors are user-configurable, so if you don't like these,
that's what you write if you don't want anyone use your software.
diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: New WB engine: HaChu 0.0

Post by diep »

hgm wrote: But the board texture blows up the image files enormously.
You aren't producing small 100 KB jpg files out of this?

Or is 100KB what you call enormously?
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: New WB engine: HaChu 0.0

Post by Daniel Shawul »

May be if I have the energy I might give you a partner engine to test against. I just wanted refresh you about writing an engine people hardly play :)
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: New WB engine: HaChu 0.0

Post by hgm »

diep wrote:
hgm wrote: But the board texture blows up the image files enormously.
You aren't producing small 100 KB jpg files out of this?

Or is 100KB what you call enormously?
Well, you can see how big they are. This is png, I have not really compared to jpg. But the wood image is 198KB and the flat colors only 6.24KB. That is more than a factor 30, which I indeed consider enormous. Especially for something that serves no purpose.
User avatar
Dan Honeycutt
Posts: 5258
Joined: Mon Feb 27, 2006 4:31 pm
Location: Atlanta, Georgia

Re: New WB engine: HaChu 0.0

Post by Dan Honeycutt »

hgm wrote:My latest engine project has seen 'first light', which seems a good time for a first release. It is called HaChu, and this is version 0.0.
Thank you, HG, for the new engine.

Or, should we say bless you?

Best
Dan H.