Check out Alice Chess, our featured variant for June, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

EarliestEarlier Reverse Order LaterLatest
ChessVA computer program
. Program for playing numerous Chess variants against your PC.[All Comments] [Add Comment or Rating]
📝Greg Strong wrote on Mon, Dec 5, 2022 02:58 PM UTC in reply to Aurelian Florea from Sat Dec 3 11:54 PM:

I just posted a new build: ChessV 2.3 RC4

This will be the final pre-release build before I officially release version 2.3 by Christmas.  It addresses a number of things you've asked about.

There is a new evaluation for the Joker to make it's value proportional to the average value of the enemy's pieces.  This will not be reflected when looking at the Joker's properties.  The built-in material value can't change but the evaluation will scale them up or down as appropriate.  (Much like the Pawn's properties don't reflect evaluation changes related to pawn structure.)  To use this in a custom game, you'll need to add the evaluation:  AddEvaluation( JokerEvaluation( Joker ) );  (where "Joker" is the name of the piece type to receive the evaluation adjustment.)

You can pause or change the clocks.  This will let you play a game with a time advantage.  Just click in the clock panels when it is your time to move and the clocks will pause and it will give you a dialog box allowing you to resume and/or change the times.  But it must be your turn - clicking on the clock panel when it's the computer's turn won't do anything.

The maximum number of directions has been increased to 72.

The <1, 2> direction notation has been standardized.  Now in all places the file offset comes first and the rank offset second.

Lots of improvements to the scripting language.  Many things have been cleaned up to require less code.  New capabilities have also been added, such as allowing piece shuffling by custom logic which will be mapped to position numbers.  (See the include files for Arktur or Massai for examples.)

There were a couple of breaking changes to the scripting language.  If you email me your include files, I'll update them.  They could use an update anyway.  Looking at the code you posted there is a lot of extraneous stuff.  There is no need to define PieceTypes outside of the game.  Games can define custom types on-the-fly.  And there is no reason to specify all the specific movements except in very unusual circumstances (e.g. Osprey).  In most cases you can just set the XBetza property.


Aurelian Florea wrote on Mon, Dec 5, 2022 03:03 PM UTC in reply to Greg Strong from 02:58 PM:

Thank you very much!


Aurelian Florea wrote on Tue, Dec 6, 2022 04:37 PM UTC in reply to Greg Strong from Mon Dec 5 02:58 PM:

Does the joker evaluation include all pieces or all piece types? How are pawn taken into account?


Aurelian Florea wrote on Tue, Dec 6, 2022 07:14 PM UTC in reply to Aurelian Florea from 04:37 PM:

And by the way Greg, I have decided to remove the rule that there shouldn't be more than one joker for a player on the board. It happened once, and in the endgame, when this happens it was not as game breaking as I thought!


📝Greg Strong wrote on Tue, Dec 6, 2022 07:40 PM UTC in reply to Aurelian Florea from 04:37 PM:

All pieces including pawns are taken into account. The midgame adjustment is proportional to the sum of the midgame values of all the opponent's pieces divided by the number of pieces. The endgame adjustment is proportional to the sum of the endgame values of the opponent's pieces divided by the number of pieces. So the Joker winds up being worth about one pawn more than the average piece value.


Aurelian Florea wrote on Tue, Dec 6, 2022 08:05 PM UTC in reply to Greg Strong from 07:40 PM:

Thanks! This is so useful!


Aurelian Florea wrote on Thu, Dec 8, 2022 12:49 PM UTC in reply to Greg Strong from Tue Dec 6 07:40 PM:

Just for the record. I have watched twenty engine vs engine games, and there were no crashes, there were no bugs and the games were fun to watch. You deserve all the praise!


Aurelian Florea wrote on Sat, Dec 10, 2022 12:21 PM UTC:

I think the X and Y in XBetza are not implemented. For NmAY I actuially get an NmA.


📝Greg Strong wrote on Sat, Dec 10, 2022 03:52 PM UTC in reply to Aurelian Florea from 12:21 PM:

That's right. I consider the X and Y thing bad design which I argued against. You can make longer jumps with [x,y] notation. These are automatically mirrored so either [1,2] or [2,1] is exactly equivalent to N. And you probably know this, but for the benefit of other readers, there is an XBetza expression tester under the tools menu so you can test expressions and make sure it is interpreting it the way you want.


H. G. Muller wrote on Sun, Dec 11, 2022 12:13 PM UTC in reply to Greg Strong from Sat Dec 10 03:52 PM:

That's right. I consider the X and Y thing bad design which I argued against. You can make longer jumps with [x,y] notation.

This is more a matter of taste than an objective advantage, though. The [x,y] notation needs at least 5 characters. With that many characters the XY notation can go up to [15,3] (GXXXX) or [11,11] (GYYYY). At which point the [x,y] notation already uses double digits. So the first cases where [x,y] would be more compact are [19,0] and [16,16]. It is extremely unlikey that such large leaps would be encountered in practice. (Perhaps for mapping a dual board or a two-level board on a rectangle, such as for Alice Chess.)

Even if it could be argued that [2,1] is better notation than N, it is just not Betza notation. Using multi-letter atoms for indicating atoms for which no single-letter notation exists has already been done by Betza himself (e.g. NN).


📝Greg Strong wrote on Sun, Dec 11, 2022 04:00 PM UTC in reply to H. G. Muller from 12:13 PM:

Sure, there's a subjective element to it, and I'm not actually arguing that [2,1] is better than N (I don't, that was just an example to explain how the notation works.)

The fact that it is less compact is almost meaningless to me. Easy to understand and easy to parse and implement is what I consider important. These long moves are very rare. No need to be cryptic to save a character or two. I also consider NN to be unnecessarily bad and I don't support it either. I use N0, which Betza also suggests.


H. G. Muller wrote on Sun, Dec 11, 2022 10:00 PM UTC in reply to Greg Strong from 04:00 PM:

Easy to understand and easy to parse and implement is what I consider important.

Well, parsing the X/Y in the Interactive Diagram was as trivial as it can get. After reading an atom and looking up the (x,y) step and default range, you have to examine the following characters anyway for being a digit that would overrule the range, or duplication to toggle the range 1<->inf. When you encounter an X in that process you just add (3,0) to (x,y) (and (2,2) for an Y), and keep looping until you encounter the digit or something else. Having to test for en entirely new (x,y) syntax would have been far more complex.

Betza notation is intrinsically more difficult to understand than (x,y) notation; you have to remember what all letters mean. If that was an argument you should not use Betza notation at all. And only having to remember that X boosts the leap by 3 steps gives you a lot of extra leaps for just remembering one more letter.


📝Greg Strong wrote on Sun, Dec 11, 2022 11:04 PM UTC in reply to H. G. Muller from 10:00 PM:

Suffice it to say I disagree with most of that but debating it is not a good use of my time. The time to debate the merits was when this came up, but instead you just did what you wanted.

Really, this is the least of it. Your XBetza has become so insanely complicated that most of it is of no use to me. There is absolutely no chance that I could implement it in a bug-free way, and some of it I don't even understand.

Fortunately, all I need to do is parse those strings that represent moves that ChessV's internal move generator is capable of anyway, and it does that with a clean subset of the grammar.


Aurelian Florea wrote on Mon, Dec 12, 2022 08:24 AM UTC in reply to Greg Strong from Sun Dec 11 11:04 PM:

Guys, I think that both sides of the argument have merit. But it is important to have one standard. Anyway I know how to implement the NmAY in chessV so that is the most important thing. I also don't think that very long leaps will often be used, but the antelope and the giraffe should appear often enough on 12x12-16x16 boards.


Aurelian Florea wrote on Tue, Dec 13, 2022 08:25 PM UTC in reply to Greg Strong from Sun Dec 11 11:04 PM:

Hi Greg,

In the five games I have published the joker imitating a pawn gains only it's regular move power, no double step, no en passant, no promotions. In the games that I am testing now with ChessV the double step is allowed to the joker if on the proper rank. The double step move is implemented as a move of a pawn on the second rank and, not as a first mover property. I'm prepared to change the rule here so that double step is allowed. It is not very important, and anyway it works this way and I have sample games like that. What are your thoughts on the matter so far?

Next, do you foresee any related problems? What scares me is to publish the game with a set of rules and then someone finds an exception or to implement my own program a slightly different game because of that.

I thought it would help if you can provide the code of the joker. But it is not only that it is also how the joker connects with other classes in your design. This is why I ask the broader question.


📝Greg Strong wrote on Wed, Dec 14, 2022 04:12 PM UTC in reply to Aurelian Florea from Tue Dec 13 08:25 PM:

The Joker piece will normally emulate all the movements of other pieces that are handled by the internal move generator, but not movements that are enabled by Rules (en passant, castling). The pawn's double move is handled by the internal move generator so it does get emulated. I knew you didn't what that, so in the two built-in Apothecary variants I added a hack to prevent it. Unfortunately, that hack will not work with the scripting language. If the boards are the same for your new variants, you could probably derive them from 'Apothecary Chess Classic' or 'Apothecary Chess Modern' and they will inherit the hack. Otherwise I will need to give this more consideration...


Aurelian Florea wrote on Wed, Dec 14, 2022 05:17 PM UTC in reply to Greg Strong from 04:12 PM:

Don't worry about that. I just wanted to know how it works, because of the reasons I have stated earlier. I'll allow the double move from the proper rank.


📝Greg Strong wrote on Wed, Dec 14, 2022 05:31 PM UTC in reply to Aurelian Florea from 05:17 PM:

Ok, that makes the implementation cleaner. Do you want me to change the two original games? Right now they are not allowing the Joker a pawn double-move. And if a Joker makes a double move when emulating a pawn, should it be possible to capture it en passant? (This is easy - just add Joker to the EnPassantRule.VictimTypes). But a Joker cannot capture a pawn that has just double-moved en passant.


Aurelian Florea wrote on Wed, Dec 14, 2022 05:46 PM UTC in reply to Greg Strong from 05:31 PM:

No, for historical purpose I think they should remain the same.


Aurelian Florea wrote on Wed, Dec 14, 2022 05:49 PM UTC in reply to Greg Strong from 05:31 PM:

The rest I'm leaving them as they are no enpassant. Thanks for your help!


Aurelian Florea wrote on Sat, Dec 17, 2022 06:45 AM UTC in reply to Greg Strong from Wed Dec 14 05:31 PM:

Hello Greg, More questions from me I'm afraid. How do I tell the AI that a piece is minor or major? I noticed the ai knows that KBvK is a draw, probably also KNvK too. I do not know about KNNvsK. I am interested in KMvK,vwhere M stands for mamluk(CW).


Aurelian Florea wrote on Sat, Dec 17, 2022 10:20 AM UTC in reply to Aurelian Florea from 06:45 AM:

Oh,

also in the KJvK endgame the AI does not know how to mate. It manages the heard the king to the corner, but then it does not give the final blow.


📝Greg Strong wrote on Sat, Dec 17, 2022 03:58 PM UTC:

There is an evaluation function called LowMaterialEvaluation that does a few things. It will immediately terminate the game if we are down to KNK, KBK, KNNK, and even KBBK if both Bishops are on the same color.

It will return a flat evaluation of zero for KBKB, KBKN, and KNKN but won't terminate the game. It also has a setting called KRKIsDraw that, when set, will return zero if down to KRK (for Cylindrical Chess and Omega Chess), but doesn't terminate the game (although perhaps it should.)

It will also perform specialized evaluation for KRKP, KRKB, and KRKN so that it can win those. And there is a KxK function (where x is Rook or other piece with an endgame value of 500 or more) which returns an evaluation based on how close the losing king is to the corner plus how close the two kings are together.

Basically, it assumes a piece can mate the enemy king if it has an endgame value over 500 and switches to specialized evaluation. If it's not over 500, it will not terminate the game except in those special circumstances dictated by the rules of chess. Perhaps it should for situations like King + Camel vs King. It could decide this if the last piece is colorbound I suppose.

In all other circumstances, the standard game evaluation function applies. So for King+Joker against King, I am not surprised it does not know how to win. Perhaps I should activate KxK evaluation for any x that doesn't promote... And perhaps I should activate it for multiple non-promoting pieces against a lone King. Certainly there is more work to be done here. I have wanted to make a specialized KPK function for a long time. Knowing how to win when down to only a couple of pieces is tricky business in Chess and obviously harder in a universal chess program where your pieces can be anything...

EDIT: There are also a couple of games where I turn off the LowMaterialEvaluation completely because it would not do "the right thing" (for example, Knightmate).


Aurelian Florea wrote on Sat, Dec 17, 2022 04:15 PM UTC in reply to Greg Strong from 03:58 PM:

Can't major or minor be a user defined property of a piece?


Aurelian Florea wrote on Sat, Dec 17, 2022 04:18 PM UTC in reply to Greg Strong from 03:58 PM:

I do not think I have expressed myself well about the joker. The K and J do manage to force the enemy king to the corner, but then it is not doing the obvious checkmating move.


25 comments displayed

EarliestEarlier Reverse Order LaterLatest

Permalink to the exact comments currently displayed.