Skip to content

Interactive Quiz-type Web Application that displays board states from real chess games and prompts the user to guess the side with an advantage. to gauge the advantage for each player

Notifications You must be signed in to change notification settings

kapilpownikar/QCRI-Chess-Project

Repository files navigation

QCRI Chess Project

//- Dr. Ting Yu, Dr. Xiaosong Ma, Dr. Saravanan Thirumuruganathan //- Project Assistant: Kapil Pownikar

Interactive Quiz-type Web Application that displays board states from recorded past chess games and prompts the user to guess the side with the current advantage.

File structure breakdown:

  1. database_gen.py - Receives a directory of .pgn files (Portable Game Notation) containing multiple games and utilizes stockfish to analyze and record interesting board states throughout the games.
    Outputs statistics for the boardstates into a .csv file (Requires anywhere from 20-24 hours to parse through 800+ games)

Note: Output can also be redirected to another format supported by pandas dataframe conversion.

  1. backend.py - Flask app that selects a randomized boardstate from given database based on user-selected criteria [Easy] / [Med] / [Hard] as well as communicating the outcome results to the front-end (either correct/wrong choice chosen by the user) as well as statistics of that boardstate in detail.

  2. testscript.js - front-end component with button-functionality (jquery ajax) as well as updating variables as the game progresses
    Contains: - Chessboard.js object with game functionality,
    - Updates on game statistics per puzzle
    - Button behavior

  3. gridstyle.css - CSS grid with attributes for the components of the page defined.
    - Defines page layout, button and text layout + positioning and size of chessboard
    - Background and color of board + grid also defined

  4. datadifficulty.csv - .csv format database of boardstates used for puzzles.
    Note: This file is updated each time database_gen.py is run on new directories of .pgn files

About

Interactive Quiz-type Web Application that displays board states from real chess games and prompts the user to guess the side with an advantage. to gauge the advantage for each player

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published