Creating chess variants on the spot

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Creating chess variants on the spot

Post by Ovyron »

Greg Strong wrote:That's where I started too, and its short-comings are what inspired me to make ChessV. ChessV does have a scripting language but it's in very early stages of development so it is pretty limited (you can make new pieces and combine pieces and existing rules, but you cannot use it to create new rules.) If you can work in C#, though, you can add your own variants fairly easily and you'll have a strong AI opponent - much stronger than ZoG ever was. If you download the source code, the zip contains a fairly detailed document describing how ChessV is put together, and how variants are programmed with several examples.
Okay, thanks! I'll check ChessV out. I studied Turbo C but have no idea how C# looks like, I'm still glad someone is working in an AI that can play already any variant implemented.

What I always have dreamed of is a GUI that allows you to connect to some server, set up a variant (say, a variant you just invented), and allow some other player to join you on the game (like chess servers, you post a Seek with your variant) and play real time. I had limited success implementing such variants when I was a TD at FICS, but they were only regular chess with different starting positions (say, one that looks like shogi, but it's just each side with 4 Knights.) Still, back then the best way to get people into chess variants was to create tournaments for them and advertize them.

Nowadays we have lichess, that allows seeking for variants and get real time opponents quickly, and users can create their own tournaments (recently, some crazy rich person created Lichess Variant Revolutions, and is creating tournaments with prize money, getting thousands of people to play them just for the prize money. That got me playing Three Check chess for the first time.)

Unfortunately, the variants they support are limited to the 8 they have, and I don't think they have implemented more for years.

Game Courier time controls aren't just the same as real time.

I wonder if something like this would enter the scope of ChessV, so that people can create their own chess variants, seek, play them, and create tournaments in real time in a chess server.
User avatar
Greg Strong
Posts: 388
Joined: Sun Dec 21, 2008 6:57 pm
Location: Washington, DC

Re: Creating chess variants on the spot

Post by Greg Strong »

Ovyron wrote:Okay, thanks! I'll check ChessV out. I studied Turbo C but have no idea how C# looks like, I'm still glad someone is working in an AI that can play already any variant implemented.
C# looks like C - same basic syntax for loops and stuff, but it is also object-oriented like C++ but cleaner and easier to use (although not as fast since it is not a fully-compiled language.) Actually, the language it is most like is Java. In any event, it is a very powerful language that is easy to get started with.
Ovyron wrote:What I always have dreamed of is a GUI that allows you to connect to some server, set up a variant (say, a variant you just invented), and allow some other player to join you on the game (like chess servers, you post a Seek with your variant) and play real time.
Yes, I have hopes to do this with ChessV at some point... offer some "go online" function to take you to a lobby where you can observe ongoing games or start up a new one. So many things I want to add and so little time ...
Ovyron wrote:Game Courier time controls aren't just the same as real time.
That is true, but I would make a couple points. First, although it doesn't force you to play in real time, if you are both online at the same time, you can play real-time. If you are still on the page after you move, it will update as soon as your opponent moves. But the time controls aren't good enough if you want to force really fast play. That said, for testing out new variant ideas, I don't think you want fast play. Correspondence play is a much better format for that in my opinion - you're not really testing out how good the variant is if you are forcing people to play an unfamiliar game without letting them take their time and think. In any event, for what you want, Game Courier is as close as it gets. You can invent a new variant and you'll easily find people willing to help you test it out. You don't even need to program in the rules. And Game Courier supports multi-board, multi-move, hexagonal boards, triangular boards, and pretty much anything else you can think of. There's really nothing else like it.
Uri Blass
Posts: 10279
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Creating chess variants on the spot

Post by Uri Blass »

I had many ideas.
Here is one idea that is not only about chess that is basically generalization of every game with captures.

The idea is simply to decide that normal chess is chess when all the pieces has rank 1.

Now you can start when all the pieces have rank 2(you can do the same for higher number to get a bigger complexity).
When you capture a piece with rank n>1 you basically do 2 things:
1)Swap squares between the pieces
2)reduce the rank of the piece that you captured by 1

only when the piece that you capture has rank 1 you remove it from the board.

Check against the king is check only if the king has rank 1
When all the pieces start with rank 1
1.e4 f6 2.Qh5 is not even check

You can have a check by 1.e4 f6 2.Qh5 b6 3.Be2 a6 4.Qxe8+

[D]rnbqQbnr/2ppp1pp/pp3p2/7k/4P3/8/PPPPBPPP/RNB1K1NR b KQ - 0 1

Now when the black king is of rank 1 it is a double check and the king has to move.

1,e4 f6 2.Qh5 a6 3.Qxe8 is also a check but not a double check

[D]rnbqQbnr/p1ppp1pp/1p3p2/7k/4P3/8/PPPP1PPP/RNB1KBNR b KQ - 0 1

Now black can reply Qxe8(not that the white queen has also rank 2 before the capture so the position in the board seems like this

[D]rnbQqbnr/p1ppp1pp/1p3p2/7k/4P3/8/PPPP1PPP/RNB1KBNR w KQ - 0 1

White can play Qxe8+ but I think that it is going to be a mistake because after that move black reply Qxe8 and really capture the queen that has now rank 1 when it may be better to capture the pawn at c7 to get the following position when the pawn c7 demote to a stone that is not allowed to move that has rank 1.

[D]rnbpqbnr/p1Qpp1pp/1p3p2/7k/4P3/8/PPPP1PPP/RNB1KBNR b KQ - 0 1

A pawn that you capture with rank higher than 1 can also promote if you capture it from the first rank and not from the last rank when the opponent is free to choose a piece to promote.

If rank 2 for all pieces is going to be too simple for computers for example in year 2400 they can try play it when you start with higher rank.
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Creating chess variants on the spot

Post by Ovyron »

Uri Blass wrote:Now you can start when all the pieces have rank 2(you can do the same for higher number to get a bigger complexity).
When you capture a piece with rank n>1 you basically do 2 things:
1)Swap squares between the pieces
2)reduce the rank of the piece that you captured by 1

only when the piece that you capture has rank 1 you remove it from the board.
Wow! Would you believe me if I told you my sister and me were playing a variant like the one you describe some 20 years ago?!

The main difference is we started the pieces with a rank in the high thousands, say:

King - Rank 10000
Queen - Rank 9000
Rook - Rank 5000
Bishop/Knight - Rank 3000
Pawn - Rank 1000

And, instead of removing 1 from the captured pieces that were swapped, we'd have them having different "attack" (what was deducted from the captured piece), something like:

King - Attack 1000
Queen - Attack 900
Rook - Attack 500
Bishop/Knight - Attack 300
Pawn - Attack 100

We kept the remaining rank of our pieces in a note book, but this note book was kept secret.

Eventually, the game would end in an epic King Vs. King mayhem where other pieces would attack the King trying to help, and the King had to decide if it was better to attack the other King or the pesky piece that would soon die. By then we had no idea who was winning and would just keep attacking until one of the kings would finally die (the objective was to capture the opposing king/leave it at rank 0 or less, no checkmating here.)

Other oddities of the variant:

A rook/queen capturing a pawn and making it swap to the end of the board would not make the pawn promote, as it still requires to move from row 7 to 8 or 2 to 1 to promote, such pawns would just get stuck unable to move.

A pawn can be swapped to the first rank, and from there it can move two squares up to the thrid rank, while pawns that already did that would regain that ability if they were swapped back to row 1 or 2.

Strangely, I don't ever reall seeing any promotion, so I don't remember what we used to do, adding Rank and Attack to a promoted pawn makes sense, but I think at any point other pieces can just stop the pawns, considering how low is their starting rank.

What I remember is that later on we played a variant of this variant, that allowed pieces to "capture" (attack) friendly pieces, so pawns stuck on the last row can get back into the game by a friendly attack, and it also had its uses on other situations where you wanted some mobility (for instance, you don't need to develop a pawn to develop your queen, just let her attack one of her friendly pawns and swap places with them.)

Other oddities I remember from this variant we played that that don't make sense:

We allowed pawns to jump over other pieces if they were making the 2 squares jump from starting position or rank 1 thing, like knights.

We hated double pawns, so we allowed pawns in a chain of at least 3 in the same row (say, a2, b2, c2) to capture/swap by moving forward, instead of their normal diagonal capture.

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

Re: Creating chess variants on the spot

Post by hgm »

Ovyron wrote:What I always have dreamed of is a GUI that allows you to connect to some server, set up a variant (say, a variant you just invented), and allow some other player to join you on the game (like chess servers, you post a Seek with your variant) and play real time.
This already practically exists. Except that what I have doesn't need a separate GUI, but is browser based. It would probably just take a few days of work to make it exactly into the thing you want.

But it would not work. Because this is not a technical problem. The problem is that you would go there, and there would be no one there to play against. The community is just too small for such a real-time server to be viable.
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Creating chess variants on the spot

Post by Ovyron »

hgm wrote:But it would not work. Because this is not a technical problem. The problem is that you would go there, and there would be no one there to play against. The community is just too small for such a real-time server to be viable.
I think it needs to support normal chess, and get people interested in playing chess there, then it's easier to find people to play a variant, as they can decide to play the variant instead of normal chess.

I think variant tournaments is still a key, if you announce that in the next week there will be a tournament in the server where some variant will be played, I'm sure people will show up!
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Creating chess variants on the spot

Post by hgm »

Ovyron wrote:..., and get people interested in playing chess there, ...
This is the true problem. Because it won't happen automatically. I host a server based on the public version of the FICS code, adapted for supporting (next to orthodox Chess) variants like Capablanca/Gothic Chess, Knightmate, Spartan Chess, Xiangqi, Shogi, Shatranj, Courier Chess... No people there at all. Neither for the variants, nor for normal Chess.
User avatar
gbtami
Posts: 389
Joined: Wed Sep 26, 2012 1:29 pm
Location: Hungary

Re: Creating chess variants on the spot

Post by gbtami »

hgm wrote:
Ovyron wrote:..., and get people interested in playing chess there, ...
This is the true problem. Because it won't happen automatically. I host a server based on the public version of the FICS code, adapted for supporting (next to orthodox Chess) variants like Capablanca/Gothic Chess, Knightmate, Spartan Chess, Xiangqi, Shogi, Shatranj, Courier Chess... No people there at all. Neither for the variants, nor for normal Chess.
You just have to follow the lichess route. Create an attractive web interface then make some hype around it. Variants they offer are popular on lichess.
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Creating chess variants on the spot

Post by hgm »

But the problem is that you would have to compete with them. The way you can distinguish yourself through the interface is quite limited. It sems to be mostly the hype that counts. I would not be surprised when of every 100 interfaces developed only one finally achieves any kind of popularity. And not necessarily the best.

And if you are really interested only in variants, having to first become one of the top websites for normal Chess seems rather a large detour/distraction. It is a bit like requiring someone is qualified to fly a jet plane before he is allowed to take a test for obtaining his drivers licence.

A more feasible route would be to latch on to one of the already popular websites. But it is questionable whether these would be interested to support exotic variants. From what I gathered Shatranj (the only variant supported by FICS/ICC involving unorthodox pieces) was not very popular. (But this could of course also be beause it is an awful game in itself.)
User avatar
gbtami
Posts: 389
Joined: Wed Sep 26, 2012 1:29 pm
Location: Hungary

Re: Creating chess variants on the spot

Post by gbtami »

Making a new chess server popular is not an easy task for sure. But it's not impossible. Lichess was nowhere couple of years ago. Now they are 2. after chess.com So it's doable but needs lots of continuous work.