Premium source code

Chess Pro

A complete chess game in Python with its own AI engine you can play against.

$15$29
Instant download Secure checkout by Stripe Free updates 14-day refund guarantee
~95kpositions / sec
6AI levels
19tests
0asset files
Chess Pro gameplay

The complete version of our chess tutorial: every rule (castling, en passant, promotion, repetition, 50-move rule...), an alpha-beta AI engine with 6 difficulty levels, clocks, PGN/FEN, drag-and-drop UI with arrows and animations, and perft-validated move generation.

Upgrades the free tutorial: How to Make a Chess Game with Pygame in Python

What makes it “Pro”

Everything the tutorial leaves as an exercise, done properly.

Its own chess engine

Negamax alpha-beta, PVS, transposition table, quiescence, null-move pruning and LMR.

Every rule

Castling, en passant, promotion picker, checkmate, stalemate, threefold repetition, 50-move rule, insufficient material.

6 difficulty levels

From Beginner (human-like mistakes) to Master, plus an opening book of 33 real lines.

Modern board UI

Drag & drop or click, legal-move dots, animations, right-click arrows, eval bar.

Clocks & history

3+2, 5+0, 10+0 and 15+10 time controls, a move list in SAN, and history browsing.

PGN & FEN

Save games as PGN, copy the FEN, start from any position, reuse the engine in your code.

Vector pieces & themes

Anti-aliased pieces drawn in code, 4 board themes, synthesized sounds.

Perft-validated

Move generation checked against the standard perft positions; 19 tests in total.

Screenshots

Real, unedited screenshots of the game. Every pixel is drawn by the code you get.

Free tutorial vs. Chess Pro

The tutorial is great for learning the basics. This is the version you'd actually ship.

Free tutorialChess Pro
RulesBasic movesAll rules incl. edge cases
OpponentAnother humanAI engine, 6 levels
PiecesNeeds downloaded imagesVector pieces drawn in code
Notation—SAN move list, PGN, FEN
Clocks—✓ 4 time controls
Undo / hint / flip / arrows—✓
Opening book—✓ 33 lines
Tests—Perft + rules + tactics (19)

A peek at the code

Clean, commented, modular Python. Here's the start of chess_pro/engine/search.py:

chess-pro/chess_pro/engine/search.py 2787 lines of Python in this project
def _negamax(self, board: Board, depth: int, alpha: int, beta: int, ply: int) -> int:
    self.nodes += 1
    if self.nodes & 1023 == 0:
        self._check_time()

    if board.halfmove >= 100 or board.is_repetition(1):
        return 0

    # mate distance pruning
    alpha = max(alpha, -MATE + ply)
    beta = min(beta, MATE - ply - 1)
    if alpha >= beta:
        return alpha

The rest of the source code is locked

Get every module of Chess Pro, plus tests, the README guide and free updates, for $15.

Unlock the full source · $15

What's inside

  • Full source code (≈2,700 lines)
  • Standalone engine package you can import
  • README with an engine-internals guide
  • 19 unit tests incl. perft
  • Free updates to this bundle
  • License to use it in your own projects
Save 51%

Get all 3 games for $19

The Game Dev Pro Pack includes Chess Pro plus our two other premium games, for $19 instead of $39.

What's in the pack?
Game Dev Pro Pack

FAQ

What do I need to run it?

Python 3.8 or newer and pygame (pip install pygame-ce, or classic pygame). It works on Windows, macOS and Linux. There are no image or sound files to download: everything is generated in code.

How do I get the files after paying?

You're sent straight to your download page, and we email you the link too. The link keeps working, so you can re-download updated versions later. Lost it? Recover your downloads with your email.

Is this beginner-friendly?

If you've followed our free tutorial, yes. The code is split into small, commented modules, and the README walks through the architecture. It's the ideal next step after the tutorial.

Can I use it in my own projects?

Yes. You can modify it, learn from it, and ship your own games built on it, even commercially. The only thing you can't do is redistribute or resell the source code itself.

What if it's not for me?

Email us within 14 days and we'll refund you. No questions asked.

Get Chess Pro now

$15 one-time. Instant download, free updates.

More premium games