Bored with orthodox Chess?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: Bored with orthodox Chess?

Post by Greg Strong »

Daniel Shawul wrote:Thanks. I have given it some thought and decided to start from scratch. There is a lot of orthodox chess specific code in Scorpio which would make
things a real mess. I am gonna start coding for a general board game where you can define the rules ,i.e how the pieces move, in a templatized code. Piece lists seem natural data structure for supporting many variants but it seems the board representation should be the simplest one(not even 0x88)
,to support smaller or larger size board games or something alien like checkers ?. I need to figure out what I want and how to go about it.
Daniel
That's great news! We need more universal chess engines. ChessV and Fairy-Max are lonely :)

With ChessV I use a combination piece list/bitboard approach. ChessV has some unfortunate design elements, though, because I had never even written a "normal" chess engine before and didn't really know what I was doing. I think the combined piece list/bitboard approach is still reasonable, though. It maintains bitboards that indicate the location of each pieces of each piece-type & player. It also activates bitboard move generation for those variants where it's feasable using old-style rotated bitboards (although Kindergarten would be much better.) When bitboard movement is not enabled for a variant, it falls back to step-wise table lookup with no "virtual" off-board squares (a 10x10 board is really 10x10.) The source code might be worth a look to you. Some aspects of it worked out quite well. For example, a list of moves is a internally a list of pickups, a list of drops, and a list of move info structs which contain, among other things, indexes into the pickup and drop lists. You can represent any type of move this way. Each move has zero or more pickups and zero or more drops... A capture is two pickups and one drop; castling is two pickups and two drops.

My new engine, Quadrox, is pure bitboard with Kindergarten move generation. No piece lists at all. It makes super-heavy use of template classes to put together a variant, allowing for powerful optimizations of games that allow it. It'll probably never be as universal as ChessV, though...
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: Bored with orthodox Chess?

Post by Greg Strong »

hgm wrote:If there is enough interest, we can organize a tournament.
I'm in, probably with both ChessV and Quadrox. Not sure this would have been my first choice of variants, but it looks decent and is perfectly acceptable.
User avatar
hgm
Posts: 27791
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Bored with orthodox Chess?

Post by hgm »

You have to see it in action to judge it. Perhaps I should set up a server running demo games. Spartan Chess has many interesting unusual features. But the main reason I am so impressed with it, is that it does not seem to have any flaws. The distribution of piece values is such that you get very natural evolution of the game towards an end-game, the game stays well balanced over the game phases because the black Hoplite Pawns increase in value when the board empties about as much as the white sliders do, the opening setup allows very smooth development of th pieces. There is a lot that is familiar (i.e. no change just for the sake of change), as all orthodox Chess pieces participate, and yet it is not possible to convert to a normal Chess game by trading of a few exotic pieces. All pieces are highly symmetric 'regular' Chess pieces without weird properties (i.e. no side effects to the moves, just simple replacement capture). And it is not overly tactical.

It is trivial to make a new Chess variant

What is your favorite variant, btw?
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: Bored with orthodox Chess?

Post by Greg Strong »

That's a tough question...

I love playing Shogi. It's an awesome game but I'm terrible at it, and it's incredibly hard to write a program for it. I'm not dedicated enough to even try.

Another favorite is Chess with Different Armies. Kinda similar to Spartan, but the kings and pawns aren't altered. The four main armies have proven to be remarkably balanced under significant chessv scrutiny with powerful servers I have at work, but Ralph Betza was studying piece values for close to two decades.

There are several good 10x10 games such as Grand Chess and Unicorn Great Chess, but there aren't too many engines that can play on 10x10. At least 10x8 is starting to develop a decent set of programs.

Switching Chess is a fun game that wouldn't be too hard for standard chess programs to implement. Alice Chess is wild fun to play but would be strange to implement to say the least.

What I think would be awesome is if each year we collectively picked a game for a tournament to be held the following year. If there was even moderate interest we could learn a lot about effective computer implementation of a variety of chess variants.
User avatar
hgm
Posts: 27791
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Bored with orthodox Chess?

Post by hgm »

Indeed, Shogi is hard. There are many problems you don't encounter in regular Chess engines, which need a fundamentally different approach. Yet you can come a long way with standard techniques. Just adding drop moves with LMR of 2ply to a standard search (using null move, LMR and a standard QS) will already beat many other engines. Biggest pain in the move generator is the drop rule for Pawns.

I recently tried Chess with Different Armies in Fairy-Max, and from that it seemed the standard armies were not so well balanced. The Clobberers seemed to have about a 1 Pawn advantage over FIDE, and the Nutters even more. (I did not test the Rookies, as Fairy-Max cannot implement the Short Rook.) I now supply all 6 combinations of (unequal) FIDE, Clobberers and Nutters armies with the Fairy-Max in the WinBoard 4.5.0 package. I added an (as yet undocmented) command to WB protocol to facilitate this: an engine can send a position to the GUI at the start of a game. This way WinBoard does not have to be aware of the initial setup, and many different sub-variants can be played as the same WB variant.
Richard Allbert
Posts: 792
Joined: Wed Jul 19, 2006 9:58 am

Re: Bored with orthodox Chess?

Post by Richard Allbert »

... Finished the movegen and make move today, so should have a finished variant in the next couple of days

Interesting variant!
PK
Posts: 893
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: Bored with orthodox Chess?

Post by PK »

It's funny, but my pre-New Year's resolution was to play a game of Shatranj against my own variant program, which I sort of managed to do. Currently it's at a very early stage of developement (mostly done when Glass is being tested and I have nothing else to do). perhaps this ill-begotten weakling will play Spartan Chess, too, but please don't expect anything reasonable from it in the next 6 months or so.

New Year Regards,
Richard Allbert
Posts: 792
Joined: Wed Jul 19, 2006 9:58 am

Re: Bored with orthodox Chess?

Post by Richard Allbert »

PK wrote:It's funny, but my pre-New Year's resolution was to play a game of Shatranj against my own variant program, which I sort of managed to do. Currently it's at a very early stage of developement (mostly done when Glass is being tested and I have nothing else to do). perhaps this ill-begotten weakling will play Spartan Chess, too, but please don't expect anything reasonable from it in the next 6 months or so.

New Year Regards,
:)

Well, I've no idea what the eval terms should be the - the two kings mess up the symmetry completely - the game is completely different with two vs one as one vs one king.

Anwyay, something that plays will do!
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: Bored with orthodox Chess?

Post by Greg Strong »

hgm wrote:I recently tried Chess with Different Armies in Fairy-Max, and from that it seemed the standard armies were not so well balanced. The Clobberers seemed to have about a 1 Pawn advantage over FIDE, and the Nutters even more. (I did not test the Rookies, as Fairy-Max cannot implement the Short Rook.) I now supply all 6 combinations of (unequal) FIDE, Clobberers and Nutters armies with the Fairy-Max in the WinBoard 4.5.0 package. I added an (as yet undocmented) command to WB protocol to facilitate this: an engine can send a position to the GUI at the start of a game. This way WinBoard does not have to be aware of the initial setup, and many different sub-variants can be played as the same WB variant.
With really deep analysis I've found them to be pretty close. With the Clobberers vs. the FIDEs, you've got to boost the value of the Rook by about a quarter point in the midgame and half a point (or more) in the endgame. The Queen is also a little stronger. The FIDEs want to survive until the endgame with at least one rook, and hopefully either two rooks or a rook and queen. If they do, the playing field is more than leveled. Against the Rookies, it's the Bishops that get a bonus. Get to the endgame with a Queen and the Bishop pair and you're probably golden. The Nutty Knights are the ones I'm a little less sure of and need more research...

So how does Winboard handle castling if you rearrange the pieces with this new command?
User avatar
hgm
Posts: 27791
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Bored with orthodox Chess?

Post by hgm »

Richard Allbert wrote:Well, I've no idea what the eval terms should be the - the two kings mess up the symmetry completely - the game is completely different with two vs one as one vs one king.

Anwyay, something that plays will do!
Indeed, IMO this was an attractive feature of this varant, that you go through two entirely different phases (in the same sense as standard Chess is a completely different game with and without Queens). So far the only engine playing it is Fairy-Max, which has almost no evaluation at all. But in a more advanced engine, I guess one should implement King Safety as doing normal single-King KS on each King and then use something like totalKS = max(KS_1, KS_2) + f*min(KS_1, KS_2), with f < 1 (perhaps f = 0.2).

As for piece values:

With the classical piece values 1, 3, 3+, 5, 9, a rough estimate for the Spartan pieces is:

H = 1
C = 3
L = 3+
K = 4.5 (but very much dependent on the safety of your other King)
G = 7
W = 8