WinBoard, exotic version

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: WinBoard, exotic version

Post by Daniel Shawul »

I can not also promote manually. It says "pull pawn backwards to underpromote" and it does not let me promote. That was in in checkers.

Btw does char of promotion piece , get mapped using pieceToCharTable. I think that was one problem I had before. Is it only FENs which get converted or promotion moves to ?

Does winboard modifies the move in anyway in alien mode. It should allow sending of small letter pieces in that case. In spartan chess f.i I have only small letter spartan pieces in the FEN. It is a bit confusing.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WinBoard, exotic version

Post by hgm »

It needs a re-compile with larger board dimensions. In the current compile the maximum is set to 16x10 (including holdings).

I think currently for any board with more than 10 ranks, counting starts at zero. This shouldnot be difficultto change, though. There really is little advantage to it when there are more than 10 ranks.

I am also in doubt as how to treat files. It seems that in Go one usually skips the i-file, right? We cannot do that generally, because in Xiangqi it is common to count upto i, and Capablanca Chess uses i and j. But we could adopt the rule that with 13 or more files we label them as is commonly done in Go.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

It needs a re-compile with larger board dimensions. In the current compile the maximum is set to 16x10 (including holdings).

I think currently for any board with more than 10 ranks, counting starts at zero. This shouldnot be difficultto change, though. There really is little advantage to it when there are more than 10 ranks.
Are there other engine's which use the rank starting from zero ? Probably so atleast for grand chess engines. We can change it if it is only Nebiyu that has to do it.

Code: Select all

const char* str_sq(int& sq,const char* is) {
	register int f,r;
	const char* s = is;
	char c = tolower(*s++);
	if(PROTOCOL == GTP && c > 'i') f = c - 'b';
	else f = c - 'a';
	if(BOARDY == 10 && PROTOCOL == XBOARD) {
		r = *s++ - '0';
	} else {
		if(isdigit(*s)) {
			r = atoi(s++) - 1;
			if(isdigit(*s)) s++;
		}
	}
	sq = SQ(r,f);
	return s;
}
I am also in doubt as how to treat files. It seems that in Go one usually skips the i-file, right? We cannot do that generally, because in Xiangqi it is common to count upto i, and Capablanca Chess uses i and j. But we could adopt the rule that with 13 or more files we label them as is commonly done in Go.
It is a bad idea and to skip. I had to do it for the GTP protocol but I didn't like it. In console mode I have a - z including the i.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WinBoard, exotic version

Post by hgm »

For Xiangqi using 0-9 is standard. So I wanted to keep starting at 0 for boards of exactly 10 ranks. Grand Chess is also 10 ranks. The inventor of it was not happy that I started counting at 0, he preferred counting 1-0. I liked starting the count at 0 for Grand Chess, though, because it puts most pieces on the same square as in 10x8 variants.

More than 10 ranks was not possible upto now, so I suppose there also aren't any engines.

Wouldn't it be a problem that we could never paste Go games into WinBoard if we make our own standard? Or is their standard format so different we couldn't do that anyway?
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

There is a smart games format (SGF) for applicable for many games including chess. It is very popular for Go and other drop piece games

http://en.wikipedia.org/wiki/Smart_Game_Format

It also stores variations and other staff. I know it will be a lot of work though. I want to implement it sooner or later so I can contribute that code if you want to. But if you feel energetic, that is the best format to implement I think :)
For Xiangqi using 0-9 is standard. So I wanted to keep starting at 0 for boards of exactly 10 ranks. Grand Chess is also 10 ranks. The inventor of it was not happy that I started counting at 0, he preferred counting 1-0. I liked starting the count at 0 for Grand Chess, though, because it puts most pieces on the same square as in 10x8 variants.

More than 10 ranks was not possible upto now, so I suppose there also aren't any engines.
So should we change it to start from 1 ? It makes my code clearer since I could have dynamically resized boards, and I don't want to adjust move format accordingly.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WinBoard, exotic version

Post by hgm »

Daniel Shawul wrote:I can not also promote manually. It says "pull pawn backwards to underpromote" and it does not let me promote. That was in in checkers.

Btw does char of promotion piece , get mapped using pieceToCharTable. I think that was one problem I had before. Is it only FENs which get converted or promotion moves to ?

Does winboard modifies the move in anyway in alien mode. It should allow sending of small letter pieces in that case. In spartan chess f.i I have only small letter spartan pieces in the FEN. It is a bit confusing.
Lower-case for black is a FEN-thing. In SAN, pieces are always indicated by capitals. You write 1. Nf3 Nc6, not 1. Nf3 nc6. Using lower-case for pieces in SAN leads to ambiguity, like bxc6 can mean Bd8xc6 or Pb7xc6.

SAN specifies promotion pieces should be capitalized (a8=Q). WB protocol specifies that in long algebraic the promotion piece should be indicated as lower-case, though. So the WB parser understands both. But there is no color info in the character; it will never promote to an opponent piece, no matter what you write.

The message "pull pawn backwards to underpromote" is normal, and printed whenever you pick up a 7th-rank Pawn. When it prints the message, the Pawn should change into a Queen already when you lift it, though. But you should be able to put it down on the promo square, though. The /sweepPromotions interface might not work if the 'Pawns' can jump from the 6th rank directly to their promo-square.

This means you won't get the opportunity tounder-promote.But in Checkers / Draughts there is no under-promotion anyway. Entering a Pawn move to last rank should maeitpromote to Queen by default if no promo-character was specified.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WinBoard, exotic version

Post by hgm »

Daniel Shawul wrote:So should we change it to start from 1 ? It makes my code clearer since I could have dynamically resized boards, and I don't want to adjust move format accordingly.
Well, for boards of exactly 10 ranks (Xiangqi, Grand Chess and International Draughts) it will certainly stay 0-9. What we do for boards of 11+ ranks is open for discussion, though.
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WinBoard, exotic version

Post by hgm »

I guess I did not answer this clearly:

Problems like we initially had in Spartan Chess should have all been fixed now. WinBoard does use the pieceToChar table to map promoChar to piece, but it first applies ToUpper or ToLower to it to be sure it is looking into the set of allowed pieces for the side that does the promotion. On output it uses the peceToChar table, and then applies ToUpperor ToLower to it, depending on if it is constructing SAN or long algebraic.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: WinBoard, exotic version

Post by Daniel Shawul »

Well in that case lets keep it at 0 also for boards of 11+. I have grand chess in both the variant=alien and variant=grand, and if we decide to start from rank 1 for the alien edition alone, it will cause even more confusion.

So in conclusion lets use :

Code: Select all

Board <= 9 start from 1
Board >= 10 start from 0
This is better than 3 conditions.

Code: Select all

Board <= 9      start 1
Board == 10    start 0
Board >= 11    start 1
User avatar
hgm
Posts: 27788
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WinBoard, exotic version

Post by hgm »

I discovered the double-digit ranks did not work for drop moves; it also considered the @ sign as a rank number > 10, and converted it to digits. I guess this is a fundamental problem for boards with more than 16 ranks;I will have to reconsider my implementation of this.

Anyway, I protected the @ from conversion to digits now when it is the rank number of the from-square, and recompiled with a larger maximum to the board size. This enabled me to play 19x19 Go with some old NebiyuGo. Provided I set /dropMenu=true, because other wise there is no way to anter a move in Go (unless you type it)!

Not sure if turn passing works; the code for legality checking based on the highlight command might have broken it.