Pawn chess program

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Pawn chess program

Post by Daniel Shawul »

Congratulations Sven! It does everything expected from an alien engine. It updates position,enforces game end rules etc. Now if you could just do the highlighting, that would be the simplest alien engine! That is a motivation for you. Lift,put and highlight are all that is needed.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Pawn chess program

Post by Daniel Shawul »

I came close twice but lost on zugzwang! It must have seen the mate long before I realized it.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Pawn chess program

Post by hgm »

Well, if these are ordinary Pawns, the intrinsic -showTargetSquares option would already do that (with legality-checking on).

I wonder if I should extend that intrinsic feature to behave the same in Ultima for the only similar case in normal Chess: e.p. capture. I.e. mark the e.p square red, and then, if you hover the Pawn above it, put a green dot on the Pawn to be captured.

I wonderif I should not make the acceptence of an initial setupcommand subect to an independent option, other than -testLegality. I don't want it to be accepted undconditionally, to prevent engines from cheating. But it could still be useful in variants where WinBoard knows the rules perfectly well, and switching legality-testing off would hurt by taking down many features (such as mate detection and other adudications, showTargetSquares, oneClickMove). E.g. for 10x8 Chess there are many different setups, and it would be nice if you could select Schoolbook, Embassy, Bird, Carrera theourh an engine option. OTOH, you could play them as CRC, if you would know their shuffle numbers. But it could also be useful for non-opening setups, such as the wild game on ICC with all Pawns starting on 7th rank, or Charge of the Light Brigade, as sub-variants of 'normal'.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Pawn chess program

Post by Daniel Shawul »

I conquer it is tempting to give some default highlighting to help out authors who do not want to do that. If the piece is a known standard chess piece may be that should be enabled. Or just provide a check box option to turn that kind of default highlight on/off for a _specific_ engine. Can you do that ?
Right now it is on/off for all engines at the same time.
Last edited by Daniel Shawul on Wed Jun 29, 2011 11:41 pm, edited 2 times in total.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Pawn chess program

Post by Sven »

Daniel Shawul wrote:I came close twice but lost on zugzwang! It must have seen the mate long before I realized it.
Which time control do you use?

The program sometimes sees very long mates about six or eight plies from the starting position, depending on the amount of time.

If it plays instantly then you can be quite sure that you are lost ...

Sven
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Pawn chess program

Post by Daniel Shawul »

Yes. It can see mates much earlier. When it sees it is loosing it seems to throw away stuff. So a challenge for you is to play best moves even when it knows it is loosing. A human can't play it perfectly.
Edit: May be that is not totally true as it selects the longest mate but anyway..
A proof number search could be very good for this kind of game. I know it is used in suicide chess successfully. Maybe some of the openings are already lost. Too many stuff you can investigate :)

I used 40/1 btw.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Pawn chess program

Post by Sven »

Daniel Shawul wrote:Yes. It can see mates much earlier. When it sees it is loosing it seems to throw away stuff. So a challenge for you is to play best moves even when it knows it is loosing. A human can't play it perfectly.
Edit: May be that is not totally true as it selects the longest mate but anyway..
A proof number search could be very good for this kind of game. I know it is used in suicide chess successfully. Maybe some of the openings are already lost. Too many stuff you can investigate :)

I used 40/1 btw.
It always plays "best moves", as you noticed: shortest mate when winning, longest mate when losing, just as it should be.

I have not investigated in studying openings yet. Actually I have tried to make the engine a lot faster (currently about 3 Mnodes/sec on my Core2Duo laptop) and also improve the search, in order to raise the border below which forced mates are usually found closer to the starting position. This would help in opening analyis, too. Since the EBF is not very high (in the range of 2.0...2.5 it seems) I think it should be possible to solve the game with some CPU days, even with the current version. I just did not try it yet.

Sven
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Pawn chess program

Post by Sven »

Where can I download the most recent (experimental?) WinBoard version supporting all of that? The "alien edition" that I have is dated from 22-mar-2011 and apparently does not support "-showTargetSquares".

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

Re: Pawn chess program

Post by hgm »

The latest Alien edition is at http://hgm.nubati.net/WinBoard-Alien.zip , (or in the tentative Nebiyu installer http://hgm.nubati.net/WinBoard-Nebiyu.exe ). But even 4.5.2 and the old Alien version you have should support -showTargetSquares. But you should also switch -highlightDragging and -testLegality on for it to manifest itself.

I am not entirely happy with this; initially I had made the showing of target squares dependent on the Highlight Dragging menu control (because it can really be an annoying option if you cannot easily switch it on or off, and I was too lazy to change the menu dialogs to add new options, so I hijacked this one). But later I added -showTargetSquares as a command-line option to make sure one could still mimic old behavior for the Highlight Dragging option. But it really should be an independent option in the menu.

That it requires legality testing is unavoidable, because it must know how the pieces move, and the main reason to switch legality testing off is that you are playing a variant where some of the pieces move differently.