Skip to content

raxod502/cs121-whales

Folders and files

NameName
Last commit message
Last commit date

Latest commit

818a89f · Mar 23, 2025
Apr 28, 2019
May 12, 2024
Apr 11, 2019
Apr 17, 2019
Apr 30, 2019
Dec 11, 2022
Mar 3, 2019
Apr 27, 2019
Oct 23, 2022
Aug 24, 2022
Aug 29, 2022
Mar 23, 2025
Mar 23, 2025

Repository files navigation

W.H.A.L.E.S.

Chess AI web application using minimax and deep learning on backend.

Backend

Backend setup

Install the following dependencies:

Clone this repository:

$ git clone https://github.com/raxod502/cs121-whales.git
$ cd cs121-whales

Run the server:

$ make run-server-dev

Code is live-reloaded. To test in production mode using a real WSGI server:

$ make run-server-prod-test

In either case, the backend is now running on localhost:5000, or whichever port is printed on the command line.

Backend usage

Install HTTPie. On macOS, that looks like this:

$ brew install httpie

This makes it easy to test HTTP requests.

$ http GET localhost:5000/not-found
$ http GET localhost:5000/api/v1 command=unknown_command
$ http GET localhost:5000/api/v1 command=list_models
$ http GET localhost:5000/api/v1 command=get_move model=random pgn="1. e4 e5 2. Qh5 Nc6 3. Bc4 Nf6 *"

General tips

Developing documentation

Install Grip. On macOS, that looks like this:

$ brew install grip

Then you can render the README locally, so you can correct formatting errors before pushing to GitHub:

$ grip

Or you can render another Markdown document:

$ grip doc/api-spec.md

Typically the server runs on localhost:6419 if that port is available.

Vendored files

We vendor a forked version of chessboard.js from here, minified online.