
Purpose of this post
This post publishes the source code used for the Othello AI. The code is loaded only when you open a file.
Models used
- Gemma 4 E4B (mlx-community/gemma-4-e4b-it-4bit): the default model of the VLM server. It currently fails to load and is not used.
- mlx-vlm: runs the model on Apple Silicon.
- Local AI: not a trained model. The source has alpha-beta search; the deployed web has the one-move weighted AI.
- There is no trained model yet.
Folder layout
- src: Qt6 C++ app. Rule engine (othello_board), search AI (aiplayer), VLM client (tcpvlmclient)
- vlm_server: OT88 TCP server, rules, Gemma 4 download
- othello-web: Next.js web play. Rule engine (board.ts), search AI (ai.ts), game storage (db.ts), VLM relay (api/vlm/move, ot88Client.ts)
Server deployment settings, monitoring and automation scripts, and game data and logs are excluded from the release. Web operation code such as ads and the list of other games, and configuration files are also left out, so some imports point to unpublished files.
Full source
37 files · 5,381 lines — open a folder and click a file to load its code.
Project root
CMakeLists.txt
Loading code…
othello-web/
othello-web/app/api/game/[code]/route.ts
Loading code…
othello-web/app/api/game/route.ts
Loading code…
othello-web/app/api/vlm/move/route.ts
Loading code…
othello-web/app/globals.css
Loading code…
othello-web/app/layout.tsx
Loading code…
othello-web/app/page.tsx
Loading code…
othello-web/app/play/page.tsx
Loading code…
othello-web/app/play/play.module.css
Loading code…
othello-web/components/OthelloBoard.module.css
Loading code…
othello-web/components/OthelloBoard.tsx
Loading code…
othello-web/lib/ai.ts
Loading code…
othello-web/lib/board.ts
Loading code…
othello-web/lib/db.ts
Loading code…
othello-web/lib/gameTypes.ts
Loading code…
othello-web/lib/guest.ts
Loading code…
othello-web/lib/ot88Client.ts
Loading code…
othello-web/lib/renderBoardPng.ts
Loading code…
othello-web/lib/vlmClient.ts
Loading code…
othello-web/package.json
Loading code…
src/
src/aiplayer.cpp
Loading code…
src/aiplayer.h
Loading code…
src/boardwidget.cpp
Loading code…
src/boardwidget.h
Loading code…
src/main.cpp
Loading code…
src/mainwindow.cpp
Loading code…
src/mainwindow.h
Loading code…
src/othello_board.cpp
Loading code…
src/othello_board.h
Loading code…
src/tcpvlmclient.cpp
Loading code…
src/tcpvlmclient.h
Loading code…
vlm_server/
vlm_server/__init__.py
Loading code…
vlm_server/__main__.py
Loading code…
vlm_server/download_gemma4.py
Loading code…
vlm_server/othello_rules.py
Loading code…
vlm_server/requirements.txt
Loading code…
vlm_server/server.py
Loading code…
COMMENTS · CHAPTER 05
The full source code and the models used 0 comments
No comments yet. Leave a question or anything you would like to add.
To post a comment, continue with Google and register a nickname and email address.
Continue with Google