Welcome to cshogi’s documentation!
cshogi is a fast Python shogi library that provides board management, legal move generation, move verification, USI protocol, and support for machine learning formats. Below is an example of creating a board, generating legal moves at the starting position, displaying them, and making a move.
- cshogi package
- Module contents
Board
Board.book_key()
Board.book_key_after()
Board.copy()
Board.csa_pos()
Board.drop_move()
Board.history
Board.is_check()
Board.is_draw()
Board.is_game_over()
Board.is_legal()
Board.is_mate()
Board.is_nyugyoku()
Board.is_ok()
Board.is_pseudo_legal()
Board.king_square()
Board.legal_moves
Board.mate_move()
Board.mate_move_in_1ply()
Board.move()
Board.move_from_csa()
Board.move_from_move16()
Board.move_from_psv()
Board.move_from_usi()
Board.move_is_draw()
Board.move_number
Board.peek()
Board.piece()
Board.piece_planes()
Board.piece_planes_rotate()
Board.piece_type()
Board.pieces
Board.pieces_in_hand
Board.pop()
Board.pop_pass()
Board.pseudo_legal_move_is_legal()
Board.pseudo_legal_moves
Board.push()
Board.push_csa()
Board.push_move16()
Board.push_pass()
Board.push_psv()
Board.push_usi()
Board.reset()
Board.set_hcp()
Board.set_pieces()
Board.set_position()
Board.set_psfen()
Board.set_sfen()
Board.sfen()
Board.to_bod()
Board.to_hcp()
Board.to_psfen()
Board.to_svg()
Board.turn
Board.zobrist_hash()
DfPn
LegalMoveList
PseudoLegalMoveList
SvgWrapper
hand_piece_to_piece_type()
move16()
move16_from_psv()
move16_to_psv()
move_cap()
move_drop_hand_piece()
move_from()
move_from_piece_type()
move_is_drop()
move_is_promotion()
move_rotate()
move_to()
move_to_csa()
move_to_usi()
opponent()
piece_to_piece_type()
to_csa()
to_usi()
- Submodules
- cshogi.CSA module
- cshogi.KI2 module
- cshogi.KIF module
- cshogi.PGN module
- cshogi.cli module
- cshogi.elo module
- Subpackages
- Module contents