News for hackers. Stuff that matters.
Re:Chess Move Compression by level3 on Thursday November 12, 2015 @10:49AM (#10553835)
Very interesting! But I don't quite see why you need to bother with tracking pieces and swapping them. Can't you just go by the convention that pawn 0 is the first pawn you find when scanning across from a1 to h8, pawn 1 is the second pawn, etc.? Similarly for the knights, bishops, and rooks? (obviously still using the fallback when necessary)

That would eliminate the need for computing swaps while still producing the same move code for a given move in a given position.

Re:Chess Move Compression by billforsternz on Friday November 13, 2015 @06:02PM (#10562987)
This would work but it requires a scan of the whole board for pawn (and knight and rook) moves. I wanted (and eventually got - after a lot of mistakes along the way) a system which would use negligible CPU cycles for almost all moves.
Re:Chess Move Compression by level3 on Saturday November 14, 2015 @10:27PM (#10568361)
That makes sense. I'm probably underestimating the amount of cycles saved by your swap method.