Comments/Ratings for a Single Item
Greg, could you indulge me over this weekend?

Greg, could you indulge me over this weekend?
With what?
Greg, Actually a while ago I have sent an email. But I had solved the problem on my own. But there is still the issue of a bug I had found. When trying to change the appearance of the "white" squares, it does not work. Can you send me again the source files you currently are confident they work. I want to try some things with the joker. I'm not sure if my email is fine. It probably is and I had missed the previous mail, when you did just that.

It seems we have email problems. I think you are getting most of my emails, but when I include a hyperlink it seems you don't receive it.
Here is a link to a recent set of source code. You will probably need to cut & paste this link - don't click on it - or it probably won't open since my site is not https:
http://chessv.org/downloads/ChessV2_2021-08-29.zip
Open with Visual Studio 2019. The free Community Edition is fine.
Regarding square colors, I need more information. There must be an unusual circumstance since the code that handles that hasn't changed in a long time and no one has ever reported a problem with that.
Unfortuneatly, I could not reproduce the bug, but I'll tell you if I find it again!
I think I found another problem. I've tried giving a piece the xbetza move pB, but even though it can only move by jumping, it can still capture like a bishop.
Also, I have a question about promotion rules. Is it possible to have pieces promote only when making a capture in a certain area of the board, and only if the promoting player has no pieces on the board of the type being promoted to?
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.
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.
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.

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.
Hello Greg!
I have a few questions:
- How do I specify 2 promotable types in with the script language?
- How do I enter the pawn double move for the maasai pawn?
- 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!

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.
Thanks, I made it work!

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!
You are welcome!
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?

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 ) );
Ok, Thanks!
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.

You're right, this rule is broken :(
I'll need to get that fixed.
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).

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.
Indeed.
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 !
25 comments displayed
Permalink to the exact comments currently displayed.
Thanks for pointing this out. For now, you can get it to work by editing the Los Alamos Chess include file. Open it with a text editor and add the following line in the first section, where Invented and InventedBy are defined: