Repolode
palemoky

palemoky/fight-the-landlord

A Go-based Fight the Landlord card game with online multiplayer, reconnection, smart bots, and a fully random deal with no card-control algorithms.

Stars
654
Forks
76
Open issues
8
Last commit
20 days ago

What is it?

This project is a Fight the Landlord (Dou Dizhu) card game written in Go. It supports online multiplayer over a server and client setup, with reconnection after disconnects and AI bots. The author built it in response to card-game apps that manipulate deals and matchmaking to push new players toward wins and later toward losses.

The game shuffles cards randomly for every round and matches players by random or room-based pairing, without considering win rate, rank, or play time. All code is open source under GPL-3.0. Bots can optionally use DouZero, a deep reinforcement learning model from Kuaishou, run as a separate Python service.

The client runs in a terminal, installed through a shell or PowerShell script and started with the ddz command. The server can be deployed with Docker Compose and uses Redis, which is needed for local development.

Key features

  • 01Random shuffling for every deal with no card-control logic
  • 02Online multiplayer with reconnection after disconnects
  • 03AI bots, optionally powered by the DouZero deep reinforcement learning model
  • 04Terminal client with one-line install scripts for macOS, Linux and Windows
  • 05Docker Compose deployment for the game server

Use cases

  • Playing Dou Dizhu with friends over a network from the terminal
  • Hosting a private game server for a small group using Docker
  • Studying how a card game server and bots can be built in Go
  • Testing a bot against a DouZero-based AI opponent

Quick start

  1. 1

    Install the client on macOS or Linux

    Install with the official instructions in the README
  2. 2

    Run the client

    ddz

Things to know

  • The README documents a Docker Compose server setup and local development that requires Redis and a Python DouZero bot service.
  • Windows 10 users should use Windows Terminal because the default console does not render the emoji icons correctly.

Topics

FAQ

What is fight-the-landlord?
A Go-based Fight the Landlord card game with online multiplayer, reconnection, smart bots, and a fully random deal with no card-control algorithms. This project is a Fight the Landlord (Dou Dizhu) card game written in Go. It supports online multiplayer over a server and client setup, with reconnection after disconnects and AI bots. The author built it in response to card-game apps that manipulate deals and matchmaking to push new players toward wins and later toward losses.
Is fight-the-landlord free to use? What license does it have?
fight-the-landlord is open source under the GPL-3.0 license. Check the license terms before using it in commercial products.
Is fight-the-landlord still maintained?
Actively maintained. The last commit to fight-the-landlord was on Oct 1, 2026.
What can I use fight-the-landlord for?
Playing Dou Dizhu with friends over a network from the terminal Hosting a private game server for a small group using Docker Studying how a card game server and bots can be built in Go Testing a bot against a DouZero-based AI opponent
How do I install fight-the-landlord?
Install the client on macOS or Linux Run the client: ddz
Where can I get fight-the-landlord?
The source code and installation instructions are on GitHub: https://github.com/palemoky/fight-the-landlord

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects