Play a historically grounded political strategy game where your edicts may be ignored or distorted by corrupt officials before they reach local administrators.
Learn about the collapse of the Ming dynasty through monthly decision-making conversations with AI-powered advisors representing different factions.
Extend the game content by adding new historical figures, events, armies, or outcome paths in the separate content folder without touching the core code.
Requires a DeepSeek or compatible LLM API key, a full 300-turn playthrough costs under a few dollars using DeepSeek's caching.
This is an AI-powered political strategy game set in the final years of China's Ming dynasty, written in Python with a web interface. The README is in Chinese. You play as the Chongzhen Emperor, the last Ming ruler, with full knowledge of how history ended: Beijing will fall in seventeen years, and the dynasty will collapse from an empty treasury, military unpaid wages, peasant uprisings, and bureaucratic infighting rather than from any single enemy. The premise is that you now have the chance to act differently. Each turn of the game represents one month. At the start of each month you receive reports on what happened: how much tax was collected, what disasters occurred, how your previous edicts were actually carried out. You then summon officials from different branches of government, the six ministries, the imperial household, military commanders, and regional governors, and hold conversations with them. Each official has their own factional loyalty, personal interests, and information they may withhold or distort. The edicts you issue do not automatically take effect as written. If imperial authority is low or funds are insufficient, the instructions that reach local officials may have been altered or partially ignored by the time they arrive. The conversation with each official is powered by a large language model. The project is designed to work with any API-compatible AI service and recommends DeepSeek models for cost efficiency, noting that a full playthrough of 300 turns can be completed for under the equivalent of a few dollars due to the model's caching behavior. At the end of each month the AI also generates a summary report written in a style meant to resemble official Ming court documents. The state of the empire is tracked through a set of numerical meters covering the treasury, popular sentiment, imperial authority, border defense, civil unrest, factional conflict, compliance with orders, and the level of concealment by officials. Every decision you make affects one or more of these meters, and those changes in turn affect what future actions are available or affordable. There is no technology tree or automatic progression. The game explicitly states it has no shortcuts to national revival. The game has a web interface with maps and character portraits, and also a command-line version for quick testing. Progress is saved locally in a database file. The character data, events, regions, armies, and AI prompts are kept in a separate content folder so players can extend or modify the game's world without changing the core code. The README describes planned additions including more historical figures, expanded outcome paths such as relocating the capital or negotiating with the Manchu forces, and more detailed factional mechanics.
← wangwei-ying3 on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.