Computer Chess Club Archives


Search

Terms

Messages

Subject: Chess program in OWL

Author: Mats Forsén

Date: 05:10:58 03/11/98


Howdy folks..

I've begun sketching on a new chess program that is to
be done in OWL (win95).. I plan to use a simple 0x88 move
gen and simplistic eval etc.. no frills.. Have I missed
something obvious? (TT is too tough)

Especially the AI and UI classes are simplistic.. I'll
have to add more as I get along with making them.. The
basic classes should be okay tho imho..

class ChessBoard
    int8 Board[144]  // piece+color present
    int16 Flags
        Castling flags (woo,wooo,boo,boo)

    void SetupBoard( epd string )
    void ResetBoard( )
    void ApplyMove( Move )
    void UndoMove( Move )
    void GenerateMoves( Player.Color, MoveList& )
    void RemoveCheckMoves( Player.Color, MoveList& )
    int16 Evaluate( Player.Color )

Player
    int8 Type (player/computer)
    char* Name
    int8 Color (white/black)
    int8 Skill (Computer only)

Game
    Player black, white
    ChessBoard Board
    MoveList[200] Moves   // All moves in game
    NumMoves
    int32 TimeLeft (white/black)
    Options
        Sound
        Music
        Speech
        En Pessant
        Time Limits
        Helplevel

MoveList
    Moves *
    NumMoves

Move
    int32 movement  // specialflags | piece_moved | piece_taken |
                       Fromsquare | Tosquare
    // Various funcs to extract data from above, inline

AI
    int16 Nodes Generated, total and for each depth
    int16 Visited nodes, total and for each depth
    int8 Maxdepth
    int32 Maxtime
    xx historysortdata

    void OpeningBook( ChessBoard, Move& )
    Negamax()  // std args
    SortMoves( MoveList ) // Historysort

UI
    DrawBoard(Chessboard)
    DrawSquare(square)
    SayMove(Move)   // Speech
    New game etc.. win32 GUI

Bitmap
    Draw(x,y)  // Chess figurines


/ Garnax, garnax@texoma.spamela.net  (remove .spamela)



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.