WinBoard, exotic version

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
User avatar
hgm
Posts: 23772
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: WinBoard, exotic version

Post by hgm » Tue Jan 18, 2011 5:09 pm

OK, the new version supports pass. To not mess too much with the internal encoding of moves, I had to do it a bit different:

In WB protocol, a "pass" has to be written as @@@@. (So that all kinds of tests WB does internally on the computer-format move identify it as a drop.)

In SAN it is printed as "pass". On parsing, "@@@@", "pass" and "null" are all recognized as pass.

The situation is very similar to that of castlings, where the protocol uses e1g1, SAN gives O-O, and 0-0 or 00 are understood as non-compliant alternatives.

The user enters a null move by clicking on the opponent's clock. (Without pressing shift; shift-clicks remain operative for adjusting the clocks, as always.)

Daniel Shawul
Posts: 3762
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

Re: WinBoard, exotic version

Post by Daniel Shawul » Tue Jan 18, 2011 6:46 pm

Ok I am happy now Smile Everything works fine. SAN or not, I used "@@@@" to represent pass moves and it accepts them both from the opponents clock and engine-engine matches. It writes them as "pass" in the PGN which as you said is the default for SAN.

Edit : Reversi still crashes on the second move. Winboard just exits itself with no warning. That is the only problem left! My go engine only counts captures for its evaluation (no territory) so it plays some horrible Go in the endgame but it is no moron now.

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

Re: WinBoard, exotic version

Post by hgm » Tue Jan 18, 2011 7:08 pm

OK, I had just assumed that the routine I used to flip the fies and ranks would work for diagonals too. Not so: when it steps back through the chain to do the actual flipping (after having found the end stop), I used:

Code: Select all

while((x -= stepX) != toX || (y -= stepY) != toY) ...
Because of the conditional operator, decrementing y is skipped when stepX is non-zero, and thus you miss the original to-square, and walk off board indefinitely. I changed the || to | now, and that makes it work. Corrected version already uploaded.

Daniel Shawul
Posts: 3762
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

Re: WinBoard, exotic version

Post by Daniel Shawul » Tue Jan 18, 2011 7:25 pm

Ok now everything works. Your job is done sir :) I will let you know if any trouble pops up. I need to work on the reversi and go engines especially on their evals to make them a bit stronger. Because material eval seems very bad for both of them.

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

Re: WinBoard, exotic version

Post by hgm » Tue Jan 18, 2011 7:54 pm

I made a web page with a few screenshots (which have already been shown here in the various threads), about this "WinBoard, Alien Editions".

http://hgm.nubati.net/alien.html

Now all I have to do is shape up the source code a bit, (separate all changes in various patches), and push that to my repository.

Daniel Shawul
Posts: 3762
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

Re: WinBoard, exotic version

Post by Daniel Shawul » Thu Jan 20, 2011 12:33 am

Nebiyu 1.0 is available here https://sites.google.com/site/dshawul/home

The chess,checkers and reversi engines are too strong for most of you humans :)
The Go engine is heavily improved but there is only so much you can do with alpha-beta. It is still very weak but atleast it defeats me. It has concepts of 'influence' besides material count now. The influence function measures how a stone influences its surrounding. This sounded to me like it is a solution of a partial differential equation with the white/black stones and edges of board as boundary conditions. So I used gauss seidel iteration to solve it :!: :?: Anyway accurately solving the influence really slows down the eval so only three jacobi sweeps are done. Enjoy beating it.

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

Re: WinBoard, exotic version

Post by hgm » Thu Jan 20, 2011 9:24 am

Could you also make it play Amazons? It seems to me your approach with the 'influence' equation could work very well there. From what I have seen watching engines play this game at the ICGA Olympiad, it is a bit Go-like in the sense that you have to conquer area, using the arrows as boundary, and the Amazons to exert influence in them. Because by the time the board is divided up in zones with only Amazons of a single color in them, he who has the smallest area will run out of moves earliest (and thus lose).

Like here:

Image

White has vastly more area. Although it is not formally sealed off yet, he will have no trouble doing it: you can withdraw an Amazon and throw the arrow to its from-square, so Amazons should be counted as boundaries as well, and other holes in the perimiter can be sealed off before any black Amazons can slip through. (The arrows are neutral objects, and it does not really matter who's color they are, although WinBoard with built-in bitmaps remembers who threw them.)

Daniel Shawul
Posts: 3762
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

Re: WinBoard, exotic version

Post by Daniel Shawul » Thu Jan 20, 2011 1:18 pm

Ok i am on it. I am going to make this also a separate super-variant as it has double moves and seems to
have features from both Chess and Go.

Something I have learned from Go and reversi is that you
can not use the same evaluation at leaf nodes and terminal nodes (i.e after two consecuative passes
and game ends). For Go I have a terminal node evaluation that exactly enforces the chinese way of scoring
and an influence function for other nodes. For reversi it is mobility for leaf nodes and material for
terminal nodes. First, I used the terminal node evaluation in leaf nodes as well and it
did very bad... I think this is because it can not measure the long term evaluation aspects properly.
And also it is a kind of on-off evaluation which can change very much in one move. For instance, in Go
if white surrounds a corner with no black stones in it , its terminal node eval is very high. Now if black
begins to put a stone inside that territory in the hope of making a double eye, it suddenly becomes zero!
This renders the terminal node eval pretty much useless as a general evaluation function!
Similar situation also in reversi's material count terminal eval and mobility leaf node eval.

I am curious what will turn out to be good in Amazons, where mobility is the final goal (used for terminal eval)
and is it influence or strict mobility as a leaf node eval ?

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

Re: WinBoard, exotic version

Post by hgm » Thu Jan 20, 2011 1:47 pm

What I have seen from sample games is that it is very succesful strategy to throw the spears as well as the Amazons in the path of an opponent Amazon (as closely to it as possible), blocking it from where you don't want it to go. (Which is usually the center of the area they are in. So from the following inital position (on non-standard 8x8, because that is the only diagram size I can post here) Ac6, L@f6 (which WB would transmit as c1c6, c6f6, btw) does seem a reasonable starting move

[d]2q2q2/8/q6q/8/8/Q6Q/8/2Q2Q2 w

Daniel Shawul
Posts: 3762
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

Re: WinBoard, exotic version

Post by Daniel Shawul » Thu Jan 20, 2011 4:32 pm

This game has a crazy branching factor! It is thousands of moves from initial start position right ? Start position generated 1376 possible moves. I need to know the maximum number of moves possible in this game. Currently it is set at 256 which couldn't even handle 19x19 go. Also my use of iterative search can also exceed stack limit with this many number of moves..
Btw can the queen place an arrow where it just left off ? It says the arrow can move backwards but I don't know if it can place an arrow there.

Post Reply