BitBully 0.0.56-a6
Loading...
Searching...
No Matches
bitbully.bitbully.BitBully Class Reference

Public Member Functions

None __init__ (self, Literal["default", "8-ply", "12-ply", "12-ply-dist"]|None opening_book="default")
list[int] score_next_moves (self, Board board)

Public Attributes

 opening_book_type = opening_book
 bitbully_agent = bitbully_core.BitBullyCore(pathlib.Path(str(db_path)))

Detailed Description

A Connect Four AI agent with opening book support.

Definition at line 14 of file bitbully.py.

Constructor & Destructor Documentation

◆ __init__()

None bitbully.bitbully.BitBully.__init__ ( self,
Literal["default", "8-ply", "12-ply", "12-ply-dist"] | None opening_book = "default" )
Initializes the BitBully agent with the specified opening book.

Args:
    opening_book (Literal["default", "8-ply", "12-ply", "12-ply-dist"] | None):
        The type of opening book to use. Options are:
        - "default": Uses the default 12-ply distance-based opening book.
        - "8-ply": Uses an 8-ply opening book.
        - "12-ply": Uses a 12-ply opening book.
        - "12-ply-dist": Uses a 12-ply distance-based opening book.
        - None: No opening book will be used.

Definition at line 17 of file bitbully.py.

Member Function Documentation

◆ score_next_moves()

list[int] bitbully.bitbully.BitBully.score_next_moves ( self,
Board board )
Scores all possible moves for the given board state.

Args:
    board (Board):
        The current board state.

Returns:
    list[int]: A list of scores for each column (0-6).

Definition at line 46 of file bitbully.py.

Member Data Documentation

◆ bitbully_agent

bitbully.bitbully.BitBully.bitbully_agent = bitbully_core.BitBullyCore(pathlib.Path(str(db_path)))

Definition at line 42 of file bitbully.py.

◆ opening_book_type

bitbully.bitbully.BitBully.opening_book_type = opening_book

Definition at line 29 of file bitbully.py.


The documentation for this class was generated from the following file: