operation to determine a location’s validity, while bitboards and the eight integer board simply do not permit invalid moves by nature of only ever operating on the valid board. As such, there are no real clever algorithms to further enhance the offerings of these representations. Checking move legality is a more involved process, requiring knowledge that the desired move obeys the piece’s movement patterns, is not in any way obscured, and that it does not result in breaking any rules of the game. Verifying movement patterns is fortunately simple for many pieces - means of doing so are addressed in table 3.j.1 below. All listed methods require very little processing time, relying heavily on checking equality of values and simple mathematical operations, two things processors are designed to be very efficient with. These methods were built into CyberChess’s chess engine and cooperate smoothly with the eight integer board. Bitboard representation simply logical-and the requested move with a representation of valid moves for the respective piece type at its current location (an array of such bitboards would take 3 kibibytes of memory). In order to ensure the game progresses properly, an attempt to move to the same space the piece currently occupies must register as illegal. Piece Movement Pattern - Programmatic Method Patterns assume all spaces are unblocked unless otherwise noted. Pawn The Pawn has the most The proper direction of a complicated movement Pawn is determined with pattern to define, being a conditional assignment dependent on its location based on the color and the type of move: identified in the Pawn’s nybble. With this At any spot, the knowledge, the system pawn may move simply runs through a forward one space series of equality checks in its file. based on adding appropriate values to the At its initial spot, rank and file. the pawn may move forward two spaces in its file. A pawn may only capture a piece that is in one of its
operation to determine a location’s validity, while bitboards and the eight integer board simply do not permit invalid moves by nature of only ever operating on the valid board. As such, there are no real clever algorithms to further enhance the offerings of these representations. Checking move legality is a more involved process, requiring knowledge that the desired move obeys the piece’s movement patterns, is not in any way obscured, and that it does not result in breaking any rules of the game. Verifying movement patterns is fortunately simple for many pieces - means of doing so are addressed in table 3.j.1 below. All listed methods require very little processing time, relying heavily on checking equality of values and simple mathematical operations, two things processors are designed to be very efficient with. These methods were built into CyberChess’s chess engine and cooperate smoothly with the eight integer board. Bitboard representation simply logical-and the requested move with a representation of valid moves for the respective piece type at its current location (an array of such bitboards would take 3 kibibytes of memory). In order to ensure the game progresses properly, an attempt to move to the same space the piece currently occupies must register as illegal. Piece Movement Pattern - Patterns assume all spaces are unblocked unless otherwise noted. Programmatic Method Pawn The Pawn has the most complicated movement pattern to define, being dependent on its location and the type of move: At any spot, the pawn may move forward one space in its file. At its initial spot, the pawn may move forward two spaces in its file. A pawn may only capture a piece that is in one of its The proper direction of a Pawn is determined with a conditional assignment based on the color identified in the Pawn’s nybble. With this knowledge, the system simply runs through a series of equality checks based on adding appropriate values to the rank and file.
SD2-CyberChessDoc.docx