Could someone make me a Chess game with no AI if I paid them?

Sort:
Ace569er

Thank you once again. I actually understand most of that. Which is nice! :)

I have 4 computers at home between me, my roommate, & his daughter. So I'll do as you suggested and test at home first.

Teaching my friend all this. Is going to be fun. If I have the steps right. It is;

To get him to download & instale the program winboard 4.8.0.

Download & replace the winboard.exe.

Download and add P2P.

Then make the .dat file with the needed code inside & add that too.

Select the engine from game menus.

Restart & select from startup menu

Select new variant then custom, form file in the game board menus.

Then the online...

Which really does sound kind of easy. Yet he is 100% computer illiterate. He has never used one really at all. So this is going to be fun. I'll most likely have his nephew do it for him. Can't wait to be able to play again.

Everything works great. The queen don't castle but that is not important. As for the advanced pawns(jacks) not promoting. That is fine too. I was in debate whether they should be allowed to anyways. Because of their move advantage. I also don't overly care if the piece icons are what I choose. The ones you picked work out just fine. I'll just have to name them a little different. I can live with that. The en passant is the only thing that is hard to let go. Which is funny. Because it is a rather rare move. Aside from that one thing. This game runs great. You did a great job on it. I'll see if i can get the P2P stuff to connect.

HGMuller

Actually upto know I hardly did anything, other than explaining how to use what already existed. It is true that this exposed some flaws in WinBoard, which I repaired, but you actually did me a favor by making these bugs surface. The change I had to make in p2p.exe to let it make use of the new WInBoard 4.8 feature for engine-defined pieces, to let it print the custom.dat file, was only 3 lines of code which took me less than 2 minutes.

So as far as I am concerned, the real fun starts now. I already fixed the e.p. problem. (A bit in an ad-hoc way, which only works for straight-ahead 3-step pushes.) And now I am working on this Q-R castling ('guarding', in Omega-Chess terminology, it seems). Which poses a logical problem: with K-R castling the move can be encoded (and entered with the mouse) as a large King step. But with guarding this would be ambiguous, as the Queen has a normal move to that same square too.

I therefore use the Chess960 trick of indicating such a 'castling' by dragging the Queen on top of the Rook. WinBoard already had a feature for 'multi-leg' moves, which normally move to their destination via an intermediate square, occupied by an opponent, which is then captured. This seemed suitable for the guarding as well: You just let the first 'leg' of the Queen move capture the Rook, and then indicate where the Queen should end up. The only thing I have to add is that the Rook should not be truly gone, but has to re-appear on the other side of the Queen. It will give a bit weird move notation for this (like Qxb3-d3, like it really captures the Rook), but that is all.

As to setting up your friend: you could of course e-mail him the custom.dat file. In fact once we have this working completely, you could put the stuff that is really required (winboard.exe, p2p.exe, custom.dat, a winboard.ini file that already has installed p2p as an engine that can be selected) in one folder, zip that and e-mail it to him. Then he just has to unpack it, and he will be ready to run.

Ace569er

I think I get what you mean with the queen. Not that I could code that, of course.That is a good idea to get it on my friends computer. That is a bit easier for him to do. I thought he would need to instale it first. Then add everything to the folder, as I did. 

So would the queen castling and e.p. just be new lines added to the costum.dat file?

HGMuller

No, they really have to be coded in WinBoard. The custom.dat file already describes them (it is the 'e' in the 'piece' descriptions of the P and D piece). But WinBoard does only artly understand that.

The engine-defined pieces is a new feature in WB 4.8.0, and it was not completely developed. I put it in the release anyway, because everything that was needed for full support of the variants the Fairy-Max AI plays were working. But things like e.p. capture still relied on the conventional code for FIDE or Berolina Pawns (which are the only Pawns Fairy-Max uses), which only do double pushes.

I got the guarding working. The super-pawn e.p. still has a bug, though: it allows the e.p. captures, but it doesn't perform them correctly. Both when the D captures and is captured e.p. the captured piece is not removed. After I fixed that I will post the new winboard.exe.

Ace569er

I see. I just noticed that pawns can not go to the promotion line. Says illegal move. They can't go past the pawn line. On the other teams side. Though I remember you said something promotions on the 3rd line prior. So you most likely knew that already.

Can you make it, so the advanced pawns can not enter their own first rank. (the rank with the queen & king)For an attack or move. If not, that is very easy to self enforce. So it's not to big a issue.

HGMuller

You probably still have "12x14+0_grand" in the 'setup' line of the custom.dat file. That was a mistake, because 'grand' means Grand Chess, where you can only promote to captured pieces. But for that to work the captured pieces would have to be displayed next to the board. This requires "12x14+11_grand" (because you have 11 capturable piece types). Then after moving the Pawn to the promotion rank, you can click on the captured piece you want it to become. But when there is nothing available to choose, you are not allowed to push the Pawn to last rank in Grand Chess.

The alternative is that you change it to '12x14+0_elven'. In Elven Chess promotion to any piece is allowed, even those not captured yet.

Ace569er

I think I can do that.

So change

12x14+0_grand

to 12x14+11_grand or 12x14+0_elven

 

I'll try the first one, first. I like the sound of that one better.

Edit: I see what you ment by the grand chess one now. I'm doing the elven one now.

Nope the Elven does not promote as well. So I guess there is no promoting in my game. Funny enough, that don't concern me too much.

Ace569er

I am curious if you could add one more thing I noticed.

I wanted it so one could pick where the advanced pawns start. I tought I could just go to edit positions. Before we started playing, and place them where they want them.(on that note, I prefer to play them, where they are) If I reposition them. Then go back to playing the game. It counts the pieces I moved around. As moving once, taking away the pawn's and advanced pawn's, I moved, triple step.
This is a feature I really wanted, but if it is not possible. Then it is not possible.

HGMuller

I just put a new winboard.exe on my website. It should now do all possible e.p. captures correctly. It should also allow 'guarding' through clickQ-clickR-clickDestination.

As to the promotions: it could be that WinBoard is in the wrong promotion mode. First of all in the General Options dialog, you have untick 'Always promote to Queen'. Then, when starting WinBoard, type in the 'Additional options' field:

-sweepPromotions false

(It remembers this, so you would only have to do that onece.) Promotions then use a popup to select the piece. With Elven Chess this should work. (But the popup is really deprecated; it only contains a limited number of pieces, so you would not have complete choice. You can always type promotion moves, though.) The sweep-promotion mechanism does't seem to work with Elven Chess. (Probably because it doesn't promote on last rank; this counts as a bug, but I still have to figure out where.) Not sure why Grand Chess would not work. Perhaps 'Always promote to Queen' was on, and no Queen available.

As to shuffling the Pawns: I can understand why that happens. I programmed the triple push as an initial move on the Pawns, and it checks this by looking if the Pawn is still in the same place as the official opening setup. And of course it counts Pawns and Super-Pawns as different. This is a case where "works as designed" does not coincide with "works as desired"... The engine-defined piece descriptions don't have a way to indicate position-dependent moves, only first-time special moves. So if the Super-Pawn returns to its starting rank, it should not get its triple-push back, because it has moved. The way it is now implemented, though, would give it its triple-push back when it returns to a square where a Super-Pawn started. This was not what I intended, but assumed could not happen (as Pawns move forward only), so that I did not bother to have WinBoard keep track of whether Pawns already moved.

For now the only solution is to edit the initial position in the custom.dat file to put the Super-Pawns (D) in a different place. This will not cure the potential loss of triple-pushes on return to the starting rank of Super-Pawns, though.

ParadoxOfNone

I just wanted to say that I think it is more than exquisite that the two of you not only found a rather elegant, simple and expeditious system.

I also wanted to say that any programmer interested in helping to further the causes of a better cheat detection/prevention system, a better tactics trainer system, a better array or player statistics and possibly an intrinsic rating system, I would love to converse with you at length.

Ace569er

How do I get to your website Muller?

Ace569er

It is odd with both "elven" and "grand". I can not move the pawn or advanced pawns past the opponents pawn row/rank. If I reposition them in the wizard's tile. So they can attack to the last row, of three tiles. They will promote.
 I can not move past the pawn row without using "edit position". To move two ranks to the wizard's square. From there I can go back to "edit game" to attack to the bottom row. Then promote.
With "grand" every piece I loss goes to the side. In "elven" every piece I TAKE goes to my side. So with elven if you took a lion and still had yours. You could promote to a second lion with the pawn. I never checked if the advanced pawns promote. Still The promote is not working to good. I'll try the "elven" again without the side squares(12x14+0_elven) I did 12 not 11 because it put the pawn over there too. So I tested (12x14+12_grand 12x14+12_elven & 12x14+0_elven)  I can't remember what the last one did. So I'll test that again.
The first two would not let me move the pawns far enough. Mind you even though I could not attack. To move to the first "true" row. I could put the King I check, with a pawn, still. Same applied to the advanced pawns.

HGMuller

This is strange, because it works for me. (Both with 12x14+12_grand and 12x14+0_elven. The latter limits my choice to what the promotion popup has buttons for, however. Which is the orthodox Chess pieces + 'Chancellor', i.e. the marshall star, which we now use for Pandora's Box. It could also offer 'Archbishop', i.e. the crossed swords symbol, which we currently don't use, and thus is not offered. I am not sure what the most obvious promotion choices would be, next to Queen; we could re-assign the pieces so that the crossed swords and marshal star are used for those, and thus can be selected through the popup.)

Perhaps you should first try what happends in normal Chess. When you start up WinBoard without engine (ticking "just view or edit games" in the startup menu) it will start in normal Chess and EditGame mode automatically. When you move a Pawn to promotion then, do you get the promotion popup with buttons that allows you to select a piece?

And if you then select "Grand" from the New Variant dialog, does the message "click on holdings to select a piece" appear in the message field? And does it then give you the piece you click on?

P.S. Oh yes. I forgot to count the Super-Pawn. Not sure if it would allow normal Pawns to promote to Super-Pawns. (I cannot imagine you would ever want to anyway...)

Also note that the 'holdings' next to the board in WinBoard can be used for different purposes. In Grand Chess, Superchess and Great Shatranj they are used for promotion choice (displaying the pieces you lost), in Seirawan Chess they just display the pieces you started with in hand, still available for gating (and no captured pieces are ever added), and in all other variants they collect what you captured (color-flipping it), so that you can drop it back onto the board in stead of another move (as in Shogi and Crazyhouse). This means you can play almost any variant as a drop game, by specifying holdings (e.g. a Crazyhouse version of Capablanca Chess).

HGMuller
Ace569er wrote:

How do I get to your website Muller?

It is still at the same link as before:

http://hgm.nubati.net/winboard.exe .

I just replaced it with a newer version.

Ace569er

So I loaded the new winboard. Then check grand, & elven again. To see if it made a diiference. I still can not move past the pawn row. In a normal game it works fine. Just it forced a 2nd queen on me. When I did not have the "always queen" option checked in my options.

So I tested it with normal in the custom.dat file. It let me past the pawn line. Yet i still had to go to the last row of 3, to promote. Which gave me a queen again.

So then I did shogi (I think that's the spelling) It lets me go past too. Plus does that wierd thing you just said.Letting me place a piece I took. On the board instead of moving. It changed my icons, so I did not like that. Then I did like 15 more. 1/3 were not  even on the variant list. The best one I found to work, was congo. Which works just like shogi, without changing my icons.

The queen castling works great. I did notice one bug. Though it's easy to aviod it. So it's of no worry. If the queen has both sides open to castle. Then when you click the cyan colored circle. The yellow move circle for castling, on both sides, appears. If you hit the wrong side. It tries to castle backwards. Like I said it's no worry. Just don't hit the wrong yellow circle. If you can castle on both sides. I just figured I'd let you know about it.

I figured out how to place my pawns. I just edit the custom.dat file. Found I can just keep the notepad open, after making it. Then just hit save as, each time I edit. Then hit new game in winboard, and it loads the updated save of the custom.dat file.. Which made testing a lot faster. Because I could not open the dat file to edit it. So I had to make a new on everytime.

It is odd that yours and mine don't run the same with promotion. I could make a video. Showing you every step I did if you would like. Yet you seemed to understand what I wrote, quite well. All I can think is you might notice something off, in a vid. I come to not care about promotion at this point, really. I think I kind of like the congo/shogi style of doing it. Plus that works just fine. I'd have to play with it a few times. To see if I like being able to place pieces all over the board, but it sounds interesting. Could be evil.

HGMuller

So you do not get a promotion popup, not even when you play normal Chess? (That is not 'normal' in the custom.dat file, but selecting 'normal' from the New Variant dialog, so that you get an old-fashioned 8x8 board.) It sounds then like you have WinBoard still set for 'Sweep Promotions'. Be sure to run it with 'Additional options':

-sweepPromotions false

Then you should get a promotion popup when you run as 12x14+0_elven . The sweep promotions did work for me too, (using elven), though. (But only on Pawns, not on Super-Pawns.) They should give you Queen by default. But with '12x14+12_grand' in the custom.dat file (or selecting 'Grand' from the New Variant menu, to play real Grand Chess) it also worked for me in both modes ("-sweepPromotions true" as well). What does it print in the "message field" above the board, when you move a Pawn to the promotion rank? Does it print anything?

Good catch about the guarding. I never tested it with both guardings available. That should be easy to fix.

BTW, you should be able to open the .dat file with NotePad by right-clicking it, and selecting "Open with" from the menu that pops up, and then NotePad. (Or perhaps even just selecting "Edit".) But leaving it open is of course even more efficient; that is what I usually do too. If you really want to use this when playing over the internet, you must make sure both sides are using the same opening position, though!

Ace569er

I don't see the with 'Additional options':

-sweepPromotions false

 

I did figure a way to get the promotions to work. For both of the pawn types. They give me a queen every time but o'well. I'll check the sweeppromotion false thing. When I find it.  I slightly redisigned the board. Didn't know how to get rid of black tiles. So I placed an anvanced pawn there instead. the board.

HGMuller

You have to type it yourself. The 'Additional options' is in WinBoard's Startup dialog, where you also select p2p as engine.

So what did you do different to get the promotions working?

Black tiles are indicated by a * in the setup command in the custom.dat file. Just replace the D by a *, and the square will go black and become inaccessible.

When sweep promotions is on, (as it likely is when you get Queen automatically) you have to drag the Pawn backwards first if you want something else, until it has morphed into the piece you want, and then push it forward to its promotion square (like below). An alternative is to click the Pawn, then press the (left) mouse button on the square you want to promote, but move it vertically before you release. The piece on the promotion square will then cycle through the possible choices, and you release the mouse button when it has become the piece you want.

Ace569er

I get what you mean now, sorry. Would I need to do that every time, in the advanced options, or would it be remembered? I figured out how to add a new piece that moves like a man(king). With the letter "c". Took me a bit to realize I had to add it in the beginning of the code too. Now there are as many leaper as sliders. Not sure if my friend will like my changes to the board or not.

HGMuller

Ah yes, I noticed the added piece. Indeed this is the piece that in XBoard's built-in move generator moves like a King. If you would want it to move different you can write an extra line in the custom.dat file:

piece C& xxx

where the 'xxx' specifies how you want it to move in  Betza notation. The C means it is for the piece that you indicate by C, and the & that it applies both to white and black. (Otherwise you haveto specify the capital C (white) and lower-case c (black) piece separately.)

This way you can design your variant anyway you want.