C++ Chess Engine mobility mathematics for 10x8 and 8x8

Discussion of chess software programming and technical issues.

Moderator: Ras

Wisely
Posts: 7
Joined: Sat Jul 06, 2024 7:39 am
Full name: Ron Luke

C++ Chess Engine mobility mathematics for 10x8 and 8x8

Post by Wisely »

Can't wait for Leele Chess Zero to play 10x8 so she can go head-to-head with Fairy-Stockfish. My variant is called "Royal Blessings" "royal-b" "royalbee in Winboard). In the mean time, you have to use Sjaak vs FairyMax (the winner will verse Nebiyu).

Anyway, I have made weaker engines stronger. Will code my own engine in C++ later. But for now, the mobility tables will allow for a "Piece-value less Engine". Heretic source code made it easy to allow it to play Royal-B

I hope I am right with these math! Heretic I know has the best source for 10x8 and will I be compiling using MinGW or Microsoft's Visual Studio. If can't, then I have to hex edit it's piece values or evaluation. So far: I have retrieved piece values for Smirf, Joker80, Nebiyu. Bihasa already has it.


10x8 (It looks both pointless and not pointless at the very same time to have a fen-string test position or book opening for 10x8. Due to its variety in the opening from the starting position)

Knight = 7.3333 x 60 = 440
Bishop = 12.1666 x 40 = 486.6666
Rook = 16 x 60 = 960
Queen = 28.1666 x 80 = 2253.3333
King = 8 x 80 = 640
Archbishop = 19.5 x 80 = 1560
Chancellor = 23.3333 x 72 = 1680
Prince (V) = 15.3333 x 96 = 1472
Princess (U) = 35.5 x 96 = 3408


8x8 (needs only a straightforward test position or book opening)

Knight = 7 x 48 = 336
Bishop = 11 x 32 = 352
Rook = 14 x 48 = 672
Queen = 25 x 64 = 1600
King = 8 x 64 = 512
Archbishop = 18 x 64 = 1152 (moves like Bishop + Knight)
Chancellor = 21 x 57.6 = 1209.6 (moves like Rook + Knight)
Prince (V) = 15 x 76.8 = 1152 (moves like King & Knight). Notice how the Prince equals the Archbishop on an 8x8 grid, mobility wise.
Cess (U) 32 x 76.8 = 2457.6 (moves like Queen & Knight)


As you can see on a 10x8 or 8x8 board grid, exclude squares on the y and x axis. Then exclude the ones further away from the center squares.

Now, from the left of the center and the top of center. Average those squares, before averaging the ones in the center.

Other board sizes are tricky, choose only ONE middle. Not many. Since it is squares-based, no graphing calculator needed.


Now this is where things begins to be tricky: When pieces go against multiple

1.388888 piece? 1 divided by 0 = 1.38888888! Gotten through 1 divided by 0.72. I forgot about numerator and denominator details.
1 piece = 0.72x
2 piece = 1.44x (based off Chancellor = Rook + Knight)
3 piece = 2.16x
4 piece = 2.88x
5 piece = 3.6x
6 piece = 4.32x
7 piece = 5.04x
8 piece = 5.76x

4 vs 2 = 3 vs 1
3 vs 2 = 2 vs 1
2 vs 1 = 2 vs 1


For example: 8x8 2 Rooks has a square variance of 48. Queen has 64

64/48 = 1.3333x CD-rom/BLuray X ratio

1.44 / 1.3333 = 1.08x

672 x 2 x 1.08 = 1451.52 (still not enough to defeat a Queen)


Important: This math doesn't cater for pawn weakness. The side that is outnumbered usually is at a disadvantage.

How about Chancellor vs Rook + Knight? Although equal, it is easier to use one piece.

How about 7 Knights vs 3 Queens on an empty board. Try and see!
I am mostly borrowing from my mother's analytical abilities. And perhaps from father. Brother is doing other stuff.
Level.. Set.. Engine!

Code: Select all

Piece: Prince
Move: leap (2,1)|(0,1)|(1,1)
Symbol: "V", "V,v"

Piece: Princess
Move: slide (H,V,D,A)
Move: leap (2,1)
Symbol: "U", "U,u"

Piece: Pawn
Promotion: "UVQRBN"