Skip to content
Projects

Bil812/Chemiss has 38 GitHub stars and 4 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-15 17:10 UTC. Last push 2026-10-23.

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

基于化学原理的策略双人棋类游戏

Learning

README.en.md

Original

Chemiss

A local two-player strategy chess game built on chemistry principles

中文 | English

Release License Platform Language Online Last Commit

Board 1

Introduction

Chemiss is a local two-player strategy board game built entirely with HTML/CSS/JavaScript. It runs directly in the browser without a server. Movement, captures and bonding simulate real chemistry: ionic bonds, covalent bonds, metallic bonds, electronegativity, radioactive decay, nuclear fission and isotope transmutation. The goal is to capture the opponent's Hydrogen King (H) — or deliver checkmate (the opponent's H is attacked and cannot escape).

Screenshot 2026-06-07 013400

Features

Chemistry (v1.6.0)

  • Full periodic table, periods 1-7, 103 elements (H-Lr) with a common isotope database
  • Three bonding and capture mechanics:
    • Ionic bonds: metal-nonmetal pairs judged by exception table, electronegativity difference and Fajans' rule; direct capture
    • Covalent bonds: adjacent opposite-color pieces auto-bond; one bond per atom, greedy assignment by descending electronegativity difference
    • Metallic bonds: multi-atom clusters share an electron sea
  • Electronegativity and polarizing power affect bond type
  • Charge system: electrostatic attraction, metal electron donation (cations/anions)
  • Li reaching the opponent's back rank can transmute into any non-H element (isotope selectable)
  • α/β/γ ray system: half-life decay, absorption transmutation, electron disturbance, stun, and heavy-nucleus fission

Gameplay

  • Local two-player mode (pure front-end, play in the browser)
  • Winning: capture the opponent's Hydrogen King (H), or achieve checkmate (the opponent's H is attacked and cannot escape — no need to physically capture it)
  • vs AI (difficulty 1-6) and AI auto-play
  • Game review: win-probability chart, move evaluation and classification
  • Move notation recording and copy, plus PGN import/export (save/load positions from the board-edit mode)
  • Guided beginner tutorial: shown automatically on first visit, replayable any time from the settings bar
  • Chess clock (Bullet / Blitz / Rapid / Classical presets)
  • Online play via MQTT room codes (no server required)

AI & Models (v1.7.0)

  • AlphaZero-style self-play RL: a policy+value dual-head network trained purely by self-play (no hand-written AI involved), with weights loaded asynchronously from an external model_weights.js (does not block first paint; file://, no backend — keep the file next to the HTML)
  • Model config page: choose a model per side (hand-written AI / Chemiss-Entropior / NNUE) and set MCTS simulations, then launch an auto battle
    • Chemiss-Entropior: neural policy+value + PUCT tree search (with MCTS-Solver terminal proof / evidence propagation)
    • NNUE: neural value head as static eval + alpha-beta (faster)
    • Hand-written AI: 15-term static eval + alpha-beta (fast, robust)
  • vs AI: the AI side plays per the model config, shown in the sidebar; ML/NNUE only applies on a standard 8×8 board (otherwise falls back to hand-written)
  • Review analysis prefers static eval + alpha-beta: fast per-move evaluation instead of per-node neural forward passes

Board Editor & PGN (v1.7.0)

  • Board-edit mode supports adjustable rows/cols (4–32) via setBoardSize(rows, cols), rebuilding the board and adapting the starting layout (white on rows R-1/R-2, black on 0/1; auto-center/truncate if not 8 columns)
  • All hard-coded 8s in move/check/bond/ray/serialize/render now use boardRows/boardCols
  • PNG export writes [BoardSize "RxC"]; import restores it, and older PGNs infer dimensions from the FEN

UI & Tools

  • Built-in element query tool (Chemiss Tool v1.4): search by atomic number / symbol / Chinese name, common/full modes, row toggles, bond relations, radioactivity, transmutation, hover cards and click-to-jump
  • Visual sidebar: selected-piece info card (piece + direction dots + stat grid + status badges), bond icons, event log
  • Rules modal with initial lineup and movement demos
  • Theme settings with dark mode, board coordinates, Debug edit mode
  • Unified fade-out animations for all modals; mobile electron-donor indicator is concentric with round dash caps
  • Chinese / English UI switching and mobile adaptation

Quick Start

  1. Clone the repository or download the Chemiss.html file
  2. Open the HTML file in a browser
  3. White moves first: click your piece to see legal moves, then click the destination

Online demo: Chemiss (GitHub Pages)

Game Rules

Full rules are documented in 化学棋Chemiss规则.md, kept in sync with the in-game rules modal.

Downloads

Windows installer (MSI) and Android APK are available on the Releases page.

Development & Build

The repository includes the Electron and Capacitor build files (package.json, main.js, preload.js, capacitor.config.json, build/, www/, android/).

Requirements: Node.js; JDK 21 is only needed for Android builds.

# Install dependencies
npm install

# Windows installer (MSI)
npm run build:msi

# Android APK
Copy-Item 化学棋Chemiss.html www\index.html -Force   # Windows
# cp 化学棋Chemiss.html www/index.html               # macOS / Linux
npx cap sync android
cd android
gradlew.bat assembleDebug   # Windows
# ./gradlew assembleDebug   # macOS / Linux

Tech Stack

  • HTML / CSS / JavaScript: pure front-end game engine
  • Electron: Windows desktop app
  • Capacitor: Android packaging
  • electron-builder: MSI installer

License

This project is open source under the MIT license.