move interpreter: part II

Discussion of chess software programming and technical issues.

Moderator: Ras

jhaglund
Posts: 173
Joined: Sun May 11, 2008 7:43 am

move interpreter: part II

Post by jhaglund »

Hello People,

It's just me again...

After receiving so much pessimism towards ideas on here, I decided to engage in some experiments over Christmas.

1) Evolving the move interpreter idea I had awhile back.

http://talkchess.com/forum/viewtopic.ph ... 11&t=35595

Anyway, I have successfully coded all the possible moves in chess.

Guess how many? (I said moves, NOT positions)

In just a couple hundred lines of code, "Human" has played it's first move with Winboard.

All-in just over 24 hrs!!!

It's obvious to me, everyone is going about it the wrong way (using decade old methods to choose a move)!

I would suggest trying to select a move based on knowledge more than trying to improve the "math" behind the move.

(negative comments are disabled). :wink:
PK
Posts: 908
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: move interpreter: part II

Post by PK »

how many moves? it depends on the constraints, i.e. there are 896 vertical sliding moves indexed by from and to squares, but 3584 vertical moves indexed by capture/non capture and Rook/Queen. Choosing the latter way, he exact number should be close to 8.000 (16.000 if checking and non-checking move are different).
zamar
Posts: 613
Joined: Sun Jan 18, 2009 7:03 am

Re: move interpreter: part II

Post by zamar »

jhaglund wrote: Anyway, I have successfully coded all the possible moves in chess.

Guess how many? (I said moves, NOT positions)
Four year old child goes to zoo for the first time and sees a lion. Next day he goes around explaining everyone: "I saw a lion, lion! NOT a cat but a lion! You got it WRONG, not a cat but a LION!"
It's obvious to me, everyone is going about it the wrong way (using decade old methods to choose a move)!
Thank you, but people in this forum have already seen the lion. The first pioneers around fifty years ago spend a lot of time with it, but as years passed cat proved to be a lot more useful...
Joona Kiiski
jhaglund
Posts: 173
Joined: Sun May 11, 2008 7:43 am

Re: move interpreter: part II

Post by jhaglund »

how many moves? it depends on the constraints, ...
Using coordinate notation:

white pawns = 100
white pawn promotes = 88
white ep = 14
black pawns = 100
black pawn promotes = 88
black ep = 14
castling = 4
knight = 336
bishop black sq = 280
bishop white sq = 280
rook = 896
queen = 1456
king = 420
-----------------------------------------
total moves = 4076 (100%)

Check '+' is the result of a move and can be added to the notation on condition met, attacking the king/sq, rather than listing the same move twice in a list.

maximum averages
moves per knight = 5.25 moves
moves per knight pair = 10.5 moves
moves per bishop = 8.75 moves
moves per bishop pair = 17.5 moves
moves per rook = 14 moves
moves per rook pair = 28 moves
moves per queen = 22.75 moves

If a knight,or other pieces are positioned on each square, moves/sq:

23444432
34666643
46888864
46888864
46888864
46888864
34666643
23444432


"Human" can count about 223 million moves per second currently...
If it writes 1 billion moves (e.g. e2e4 e7e5) to a file it took 2.75 GB of space, and about 11 minutes.

Useful, useless, old, new, or relevant... it's how you apply it that counts.