RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/CLAUDE.md/RizzoHou/amazing-amazons

CLAUDE.md

CLAUDE.md
CLAUDE.mdroot

Quality

96/100

Scores the file, not the repository.

Length

834 words

25 headings · 9 code blocks

Repository

0

— · pushed 204 days ago

Last changed

3 days ago

First indexed 3 days ago.
RizzoHou/amazing-amazons/CLAUDE.mdRawGitHub
1# CLAUDE.md
2 
3This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4 
5## Project Overview
6 
7This is a competitive AI bot development project for the Game of Amazons, designed to run on the Botzone platform. The project focuses on creating high-performance bots using Monte Carlo Tree Search (MCTS) with various optimization techniques.
8 
9**Key Technologies**: Python 3.6+, C++11, NumPy
10**Platform**: Botzone (Ubuntu 16.04 x86-64)
11**Game**: Amazons (8×8 board, 4 amazons per player, queen movement + arrow shooting)
12 
13## Development Commands
14 
15### Bot Compilation
16C++ bots are compiled manually with:
17```bash
18g++ -O3 -std=c++11 -o bots/botXXX bots/botXXX.cpp
19```
20 
21The tournament system provides a helper function:
22```bash
23python -c "from scripts.tournament.utils import compile_bot; compile_bot('bot003')"
24```
25 
26### Testing Commands
27**Quick functionality test** (first move as BLACK):
28```bash
29echo "1
30-1 -1 -1 -1 -1 -1" | python bots/bot001.py
31# or for C++ bots:
32echo "1
33-1 -1 -1 -1 -1 -1" | ./bots/bot001_cpp
34```
35 
36**Run simple bot tests**:
37```bash
38python scripts/test_bot_simple.py
39```
40 
41**Run Botzone protocol simulation**:
42```bash
43python scripts/botzone_simulator.py
44```
45 
46### Tournament System
47The tournament framework (`scripts/tournament/`) provides comprehensive testing:
48 
49**Single match**:
50```bash
51python -c "from scripts.tournament.cli import run_match; run_match('bot001', 'bot003')"
52```
53 
54**Competition automation** (10-game series):
55```bash
56python scripts/run_competitions.py
57```
58 
59**Check legal moves** (debugging tool):
60```bash
61python scripts/check_legal_moves.py
62```
63 
64**Debug board visualization**:
65```bash
66python scripts/debug_board.py
67```
68 
69## Architecture Overview
70 
71### Directory Structure
72- `core/` - Shared game logic (board representation, move generation)
73- `bots/` - Bot implementations (Python and C++ versions)
74- `scripts/` - Testing and utility scripts
75- `docs/` - Comprehensive documentation
76- `memorybank/` - Project context and technical decisions (Cline system)
77- `results/` - Tournament results (JSON format)
78- `logs/` - Match logs and output
79 
80### Bot Architecture
81The primary algorithm is **Multi-Component MCTS** with these key features:
82 
831. **Multi-Component Evaluation**: Five strategic factors combined:
84 - Queen Territory (BFS-based territory control)
85 - King Territory (weighted close-range control)
86 - Queen Position (exponential decay scoring)
87 - King Position (distance-weighted positioning)
88 - Mobility (available moves count)
89 
902. **Phase-Aware Weighting**: Different strategies for early/mid/late game phases
91 
923. **Dynamic UCB Constant**: Exploration decreases as game progresses
93 
944. **Long-Running Mode**: Maintains MCTS tree state between turns for efficiency
95 
96### Bot Implementations
97- `bot001.py` / `bot001.cpp` - Primary MCTS implementation (Python and C++ versions)
98- `bot002.cpp` - Optimized version with bitboard representation (has TLE issues)
99- `bot003.cpp` - Baseline MCTS bot for comparison
100- `bot004-bot008.cpp` - Optimization bots with different techniques
101- `opponent.cpp` - Latest implementation with AVX2 SIMD optimizations
102 
103## Platform Constraints (Botzone)
104 
105### Time Limits
106- **Python long-running bots**: 12s (first turn), 4s (subsequent turns)
107- **C++ long-running bots**: 2s (first turn), 1s (subsequent turns)
108 
109### Resource Limits
110- Memory: 256 MB default
111- CPU: Single core (no multi-threading benefit)
112 
113### I/O Protocol
114- Simplified interaction: Line-based stdin/stdout
115- Long-running mode: Must flush stdout after each turn
116- Move format: 6 integers `x0 y0 x1 y1 x2 y2`
117 
118## Development Workflow
119 
120### Cline Memory Bank System
121The project uses a Cline memory bank (`memorybank/`) for context:
122- `projectbrief.md` - Project overview and objectives
123- `systemPatterns.md` - Architecture and design decisions
124- `techContext.md` - Technologies and constraints
125- `activeContext.md` - Current state and next steps
126- `progress.md` - Development progress and milestones
127 
128### Development Rules (`.clinerules/`)
129- `development_workflow.md` - Development processes
130- `task_completion.md` - Mandatory sequential workflow for task completion
131- `memory_bank_update.md` - How to update memory bank files
132- `readme_update.md` - README update procedures
133 
134### Key Development Patterns
1351. **Always test sequentially** - Run tests in order: simple test → protocol simulation → tournament
1362. **Update memory bank first** - Review and update memory bank files before making changes
1373. **Check Botzone compatibility** - Ensure bots work within platform constraints
1384. **Use tournament framework** - For comprehensive testing and performance comparison
139 
140## Common Tasks
141 
142### Creating a New Bot
1431. Copy an existing bot (e.g., `bot003.cpp`) as a starting point
1442. Implement optimization technique
1453. Compile: `g++ -O3 -std=c++11 -o bots/botXXX bots/botXXX.cpp`
1464. Test with simple test script
1475. Run competition against baseline (`bot003`)
1486. Analyze results in `results/competitions/`
149 
150### Debugging TLE (Time Limit Exceeded) Issues
1511. Check time limits in bot code (conservative buffers required)
1522. Use tournament system to measure actual execution times
1533. Profile with `scripts/check_legal_moves.py` for move generation issues
1544. Review Botzone logs for specific timing patterns
155 
156### Testing Botzone Compatibility
1571. Use `botzone_simulator.py` to simulate platform I/O
1582. Verify long-running mode works correctly
1593. Check memory usage stays under 256 MB
1604. Ensure move format matches Botzone expectations
161 
162## Important Notes
163 
164- **No automated build system** - Bots are compiled manually
165- **NumPy dependency** - Required for Python bots, not for C++ bots
166- **Tree reuse** - MCTS trees are preserved between turns in long-running mode
167- **Bitboard representation** - Used in optimized bots for faster operations
168- **AVX2 optimizations** - Latest addition in `opponent.cpp` for SIMD parallelism
169 
170## Getting Started
1711. Read `README.md` for comprehensive project overview
1722. Check `memorybank/` for current project context
1733. Use tournament framework for testing: `scripts/tournament/`
1744. Follow Cline workflows in `.clinerules/` for development tasks

Commands it names

  • python -c "from scripts.tournament.utils import compile_bot; compile_bot('bot003')"
  • python scripts/test_bot_simple.py
  • python scripts/botzone_simulator.py
  • python -c "from scripts.tournament.cli import run_match; run_match('bot001', 'bot003')"
  • python scripts/run_competitions.py
  • python scripts/check_legal_moves.py
  • python scripts/debug_board.py

Sections

  • CLAUDE.md
  • Project Overview
  • Development Commands
  • Bot Compilation
  • Testing Commands
  • or for C++ bots:
  • Tournament System
  • Architecture Overview
  • Directory Structure
  • Bot Architecture
  • Bot Implementations
  • Platform Constraints (Botzone)
  • Time Limits
  • Resource Limits
  • I/O Protocol
  • Development Workflow
  • Cline Memory Bank System
  • Development Rules (`.clinerules/`)
  • Key Development Patterns
  • Common Tasks
  • Creating a New Bot
  • Debugging TLE (Time Limit Exceeded) Issues
  • Testing Botzone Compatibility
  • Important Notes
  • Getting Started

What it covers

setuptestlint-formatcode-stylearchitectureperformancedo-notagent-behaviour

Stack — with the evidence

cpp

(0.80)

Format

CLAUDE.md

Claude Code's memory file. Shaped like AGENTS.md but with two things it lacks: @path imports, so shared rules live in one place, and a user-scope layer that follows the developer across repos rather than shipping with the code.

What the corpus says about it

Repository

Owner
RizzoHou
Language
—
License
—
Archived
no

All configs in this repo

Also in RizzoHou/amazing-amazons

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
RizzoHou/amazing-amazons.clinerules/cline_operations.md · 0Cline rulescppno sections25/1003 days ago
RizzoHou/amazing-amazons.clinerules/development_workflow.md · 0Cline rulescppstyleagent-behaviour43/1003 days ago
RizzoHou/amazing-amazons.clinerules/documentation.md · 0Cline rulescppdocs25/1003 days ago
RizzoHou/amazing-amazons.clinerules/memorybank.md · 0Cline rulescpparchperformanceagent-behaviourdocs52/1003 days ago
RizzoHou/amazing-amazons.clinerules/project_setup.md · 0Cline rulescppsetupagent-behaviour25/1003 days ago
RizzoHou/amazing-amazons.clinerules/version_control.md · 0Cline rulescppstylegitdeployment17/1003 days ago
Diff against .clinerules/cline_operations.md Diff against .clinerules/development_workflow.md Diff against .clinerules/documentation.md Diff against .clinerules/memorybank.md Diff against .clinerules/project_setup.md Diff against .clinerules/version_control.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
ClickHouse/ClickHouse.claude/CLAUDE.md · 49kCLAUDE.mdcpppostgres+8buildteststylearch+696/1002 days ago
electron/electronCLAUDE.md · 122kCLAUDE.mdtypescriptjavascript+3setupbuildteststyle+596/1003 days ago
pytorch/pytorchCLAUDE.md · 102kCLAUDE.mdpythonpytorch+4setupbuildtestlint-format+588/1003 days ago
pytorch/pytorchtorch/_dynamo/CLAUDE.md · 102kCLAUDE.mdpythonpytorch+4buildteststylearch84/1003 days ago
facebook/rocksdbCLAUDE.md · 32kCLAUDE.mdcppgithub-actionsbuildtestlint-formatstyle+864/1003 days ago
ossrs/srs.claude/CLAUDE.md · 29kCLAUDE.mdcppgo+3monorepoagent-behaviour16/100yesterday
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack