Check out Glinski's Hexagonal Chess, our featured variant for May, 2024.


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

Comments/Ratings for a Single Item

LatestLater Reverse Order EarlierEarliest
ChessVA computer program
. Program for playing numerous Chess variants against your PC.[All Comments] [Add Comment or Rating]
Aurelian Florea wrote on Fri, Oct 21, 2022 09:32 AM UTC in reply to Greg Strong from 01:25 AM:

And a final thing which is rather hard. But if you can please add the customizable value for the joker. HG has proposed the ratio of the sum of squares of the piece value with the piece values. I think some coefficients are good to be in place. Something like (a1p1^2+a2p2^2+...+anpn^2)/(b1p1+b2p2+...+bnpn). where n is the number of piece types and a1,...,an and b1,...,bn are float coefficients. One utility of the coefficients is when imitating a colourbound piece as the joker is not actually colourbound. I know this takes time, so if you can... Good luck Greg!


Aurelian Florea wrote on Fri, Oct 21, 2022 09:26 AM UTC in reply to Greg Strong from 01:25 AM:

I'm not sure if I have the current build. But I'd like the following features for batch mode. 1.Add an adjudication coefficient with a default of say 10 pawns. 2.In the save file add the end add the total score.


H. G. Muller wrote on Fri, Oct 21, 2022 08:41 AM UTC in reply to Aurelian Florea from 08:04 AM:

I would not introduce yet another form of castling. How about Kevin's 'fast castling' rule?

But normally getting out 3 pieces should not be a problem. Of course it depends on whether these pieces can jump, or otherwise get out without destroying the Pawn shield. If they had to compromise the Pawn shield (e.g. like starting a Commoner on the Knight squares of the FIDE setup) that would just count as bad design. (In the Daring Dragons army of CWdA I gave the Dragoon an initial Knight jump for that reason.)

In a Grand-Chess like setup with enough empty space on the back rank there would not be a problem to clear the 2nd rank for castling; one can just retract the pieces to the back rank.

In the KingSlayer approach moving the pieces out of the castling path is encouraged, because it makes the castling right in that direction more valuable (less discounted). And the castling right with the highest weight (because it is the best of the two) would be preferred, because it contributes most to the total. So it encourages clearing one path completely before clearing the other partially (other factors such as quality of the Pawn shield being the same). This usually leads to quick clearing of one castling path. But if the other castling is still possible, it would not immediately castle, because having a second right (even when weighted less than the best right) is worth slightly more than the difference between having the right and being in the castled position. Which is what you want: keeping the opponent in the dark as long as possible so that he doesn't know what wing to aim his pieces at during development is usually a good strategy.

Of course the quality of the Pawn shield (which also takes account of enemy Pawns, such as half-open files directed at the shield, or an approaching Pawn storm) remains part of the evaluation even after castling. (But then of course only the one in the direction you actually castled.) This prevents the engine from destroying its own Pawn shield later, while it 'liberates' the Pawns on the other wing.

All this is pretty cheap, as the shield qualities are part of the Pawn-Structure evaluation, which is rarely done, because it is stored in a Pawn hash table that has a very high hit rate. The K-side and Q-side shield qualities are just two items in the Pawn hash entry. (Together with info about half-open files, passers, edge Pawns etc.) And you can stop calculating them once all castling rights are gone, which is usually pretty early in the game.


Aurelian Florea wrote on Fri, Oct 21, 2022 08:04 AM UTC in reply to H. G. Muller from 07:04 AM:

@Greg&@HG, Now there is the trouble that the ai moves the pawns ahead of the possible location of the castling king, or ahead of the castled king, again quite arbitrary. There is only one heavy piece besides the queen in the games I mention (between the value of the rook and of the queen) so deadly back rank incursion from the enemy don't seem the desirable. But there are 26 pieces /side, and some pawns need to move to bring some air into the position. So maybe some penalty from leaving pawns on one side OR the other side is welcome. This as it is needed to move some flank pawns in order to develope quickly. I agree with HG, KingSlayer approach. Maybe you can customize all of that, Greg.

There is one more issue. With a 10 files board one needs to get out three pieces before castling. In the games I had mentioned there are the bishops by the queen and king and 2 leapers. Then there are the rooks. On the other side there is also the queen. The fact that you have to take out 3 pieces hinders castling a bit. I was thinking about a "Bishop jumping rule during castling". This means the castling king may jump the bishop when castling but not to other pieces. Would this be a good idea. What do you guys think?


H. G. Muller wrote on Fri, Oct 21, 2022 07:04 AM UTC in reply to Greg Strong from 01:25 AM:

In variants where there is more than one rank behind the Pawns, and many strong pieces, castling directly behind the Pawns is often a very bad move. In general one could say that in such variants the castling rule is only added out of conservatism, but is as useless as adding a rule that at any time you can permanently remove your Queen from the board instead of making a normal move. No one in his right mind would ever do it. Even in the central files, a King on the back rank sheltering behind by a wall of Pawns plus a wall of pieces is usually a lot safer than a King directly behind the Pawns.

So the first issue to consider is whether it is really a good idea to force an engine to make poor moves just because the rules allow those. That being said, if it is really such that castling is good, the usual way is to discourage moving an uncastled King not by Piece-Square Tables, but by giving a hefty bonus for the possession of castling rights. (Which should reflect the PST and other positional score the King would get in the castled position. If they were higher the engine would never castle, because he would think it more important to preserve the rights to do so.) In KingSlayer I always evaluate the quality of the Pawn shield in the castled locations, and derive the value of each castling right from that. These are then devaluated a little depending on the number of pieces that still block the castling. And the total value of the rights is that of the best right plus a factor smaller than one times the other.


📝Greg Strong wrote on Fri, Oct 21, 2022 01:25 AM UTC in reply to Aurelian Florea from Thu Oct 20 02:40 PM:

The piece-square-tables do encourage the king to retreat to the first row. You can see the PSTs by right-clicking on the piece, selecting Properties, and then look at the Midgame or Endgame PST tab.

We can eliminate that desire by zeroing the "forwardness" midgame PST component (which is negative for the king.)  In your AddPieceTypes function:

King.PSTMidgameForwardness = 0;

See if that helps.  There can be other factors as well, like the deveopment evaluation and king safety evaluation, although the development evaluation should be encouraging it to castle.


Aurelian Florea wrote on Thu, Oct 20, 2022 02:40 PM UTC in reply to Greg Strong from Thu Oct 13 07:10 PM:

So, the games I'm creating are 10x10 and the castling type is 2R-standard (it is correctly assigned this is not the problem). The ai is quick to move to the back rank most of the time for no reason before castling, and sometimes (rarely) after castling seemingly for no reason. In the latter case I can be totally wrong though. Anyway, how do I disable this tendency of the general 10x10 ai? Would you recommend I inherit from a more general class or general 10x10 is fine?


Aurelian Florea wrote on Thu, Oct 13, 2022 08:07 PM UTC in reply to Greg Strong from 07:10 PM:

But also from some point ahead, I prefer the correct rules. Anyway, for the purpose of measuring the piece values , I do not use the joker as it introduces many instabilities. By the way, in the few games I,be noticed so far there are no joker related bugs. But I do not know if I can suppress the special pawn powers when imitating a pawn. Also chessV does not use the move by move recalculation of the joker value. And these things are difficult to do. Partly this is why I'm trying my hand, at my own program !


Aurelian Florea wrote on Thu, Oct 13, 2022 07:13 PM UTC in reply to Greg Strong from 07:10 PM:

Indeed.


📝Greg Strong wrote on Thu, Oct 13, 2022 07:10 PM UTC in reply to Aurelian Florea from 06:50 PM:

Helping to test game design is certainly an intended purpose. But do you need a new build just to correct this one issue? For test purposes, I wouldn't think allowing 2 jokers or not allowing promotion to joker at all would change very much.


Aurelian Florea wrote on Thu, Oct 13, 2022 06:50 PM UTC in reply to Greg Strong from 06:42 PM:

Please let me know when you solve this, as I'm using ChessV for designing my games (not the intended purpose I guess, but ChessV is very general).


📝Greg Strong wrote on Thu, Oct 13, 2022 06:42 PM UTC in reply to Aurelian Florea from 06:07 PM:

You're right, this rule is broken :(

I'll need to get that fixed.


Aurelian Florea wrote on Thu, Oct 13, 2022 06:07 PM UTC in reply to Greg Strong from 05:37 PM:

There is probably a bug with that instruction. I have sent you an email as the error message is very long!

I feel that this rule interacts badly with the joker. I have not seen other joker bugs, as of now!

Later edit. I have tried limiting the rooks to 2. There is the same error.


Aurelian Florea wrote on Thu, Oct 13, 2022 05:38 PM UTC in reply to Greg Strong from 05:37 PM:

Ok, Thanks!


📝Greg Strong wrote on Thu, Oct 13, 2022 05:37 PM UTC in reply to Aurelian Florea from 05:02 PM:

No problem. Use the promotion rule as normal - always allow promotion to Joker. Then, there is another rule you can use to limit the number of pieces of a given type on the board. LimitPieceTypeQuantityRule( PieceType, maxCount ). So:

AddRule( LimitPieceTypeQuantityRule( Joker, 1 ) );

 


Aurelian Florea wrote on Thu, Oct 13, 2022 05:02 PM UTC in reply to Greg Strong from 03:29 PM:

I have stumbled on another hurdle, Greg. I need to not have more than a Joker on the board. So that means no promotion to joker unless my joker has been captured. I figured out I have to use PromoteByReplacementRule but I can't get my head around the second argument. Can you help, please?


Aurelian Florea wrote on Thu, Oct 13, 2022 03:51 PM UTC in reply to Greg Strong from 03:29 PM:

You are welcome!


📝Greg Strong wrote on Thu, Oct 13, 2022 03:29 PM UTC in reply to Aurelian Florea from 03:17 PM:

Why are the rank and files reversed when you define a move with steponly

You're right, the rank & file offsets are backwards when you use the <1, 2> notation.  I will have to fix this.  The file offset should come first.  For now, so that I don't break your code, instead of using the <1, 2> abbreviation, you can construct the Direction normally: Direction( 1, 2 ).  This calls the constructor directly and it takes the file offset first.

Thank you for pointing this out!


Aurelian Florea wrote on Thu, Oct 13, 2022 03:17 PM UTC in reply to Greg Strong from 02:38 PM:

Thanks, I made it work!


📝Greg Strong wrote on Thu, Oct 13, 2022 02:38 PM UTC in reply to Aurelian Florea from 01:15 PM:

How do I specify 2 promotable types in with the script language?

You can add additional promotion rules for other promotable types.  You aren't limited to one.  So for the Maasai:

AddRule( BasicPromotionRule( Maasai, { Queen, Eagle, Lion, Sorceress, Duchess, Rhinoceros, Buffalo }, { location: location.Rank = 11 } ) );

How do I enter the pawn double move for the maasai pawn?

The simple way to do this is with XBetza.  Don't specify an internal type and set it's move with XBetza like this:

AddPieceType( "Maasai", "M", 200, 200, "Sergeant" );
Maasai.XBetza = "msWcfFmfR2";

In this example, Sergeant specifies the preferred graphic to use.  Also, under the Tools menu, there is an XBetza Expression Tester so you can make sure your XBetza is supported.  (ChessV does not support everything.)

For a more complicated example, lets say the double move is only supported on the second rank.  Then you have to use PieceType.AddMoveCapability, which takes a MoveCapability object, who's constructor looks like this:

MoveCapability( Direction dir, int maxSteps = 9999, int minSteps = 1, bool canCapture = true, bool mustCapture = false )

So you would have something like:

FancyPawn.AddMoveCapability( MoveCapability( <1, 0>, 2, 2, false ) ).Condition = { location: location.Rank == 1 };

The maxSteps is 2.  The minSteps is also 2 because the single step would already be generated by the regular move capability that is applicable everywhere.  canCapture is false, and mustCapture is left as the default (false).  Then we set the Condition under which the move is available, which is a lambda function taking a location as a parameter and returning a bool.  (location.Rank == 1 because, like all good programmers, we start counting at 0.)

For a good example of a game that does everything manually, look at the include file for Duke of Rutlands chess.

Why are the rank and files reversed when you define a move with steponly

Let me look into this.  The file offset should always come first.


Aurelian Florea wrote on Thu, Oct 13, 2022 01:15 PM UTC:

Hello Greg!

I have a few questions:

  1. How do I specify 2 promotable types in with the script language?
  2. How do I enter the pawn double move for the maasai pawn?
  3. Why are the rank and files reversed when you define a move with steponly (I have : AddMoves{ AddMovesOf(Pawn) StepMoveOnly(< 0,-1>) StepMoveOnly(< 0, 1>) }) and with the AddMoveCapability (example: PawnDoubleMove.Direction = new Direction( 0,1 );). The first is lateral and the second is up!

📝Greg Strong wrote on Fri, May 13, 2022 12:32 AM UTC:

Thanks, Sam. This is not too bad... I gather my algorithm was correct, but I assumed that the positions would be numbered 1-960 (as people count), not 0-959 (as programmers count). In fact, it looks like I just add one at the end after placing the pieces. Not sure where I got that - it's unlikely I just made it up, but it does seem that the consensus is to number the positions starting at 0. Anyway, easy fix.


Aurelian Florea wrote on Thu, May 12, 2022 08:25 AM UTC:

I don't think this is a bug. At most it is a missing feature. Greg usually takes care of these but he probably not knew the rule.


Samuel Trenholme wrote on Wed, May 11, 2022 08:21 AM UTC:Excellent ★★★★★

I don’t know the correct procedure to file a bug report for ChessV, so I will just note the bug here.

Description of bug

ChessV does not use the standard Chess960 numbering scheme for opening setups. See https://chess960.net/wp-content/uploads/2018/02/chess960-starting-positions.pdf for the reference of correct number to starting position. In particular, ChessV is off by one (Position 0 in the official spec is position 1 in ChessV, etc.)

Steps to reproduce

Open up ChessV. Choose Fischer Random Chess. When it asks for an expected setup, choose setup #692.

Expected results

The opening setup should be RBBQKNNR (Mongredien chess)

Actual results

The setup is BRQKNNRB

Notes

Position 693 is the Mongredien setup in ChessV, so one just needs to add 1 to the official position number to get the corresponding position in ChessV.

Position 518 (519 in ChessV) is the standard chess starting position.


Samuel Trenholme wrote on Sun, May 8, 2022 07:00 AM UTC:Excellent ★★★★★

https://samiam.org/chessv continues to host the ChessV software, and, indeed, has been updated to have version 2.2 of ChessV. Should chessv.org ever go down, this is an alternate download link.


25 comments displayed

LatestLater Reverse Order EarlierEarliest

Permalink to the exact comments currently displayed.