git clone https://github.com/GameDevGitHub/GuidedRandomAgent.git
cd GuidedRandomAgent
ARC_API_KEY="your-secret-api-key-here" uv run main.py --agent=guidedrandom
- Effective Action Prop Bias: The agent categorizes actions into
arrow keys, spacebar, and clicks. It adjusts the probability of choosing each type based on whether past actions of that type resulted in a change to the game grid.
- Object Tracking: It analyzes the pixel grid each turn to identify distinct objects (like squares and rectangles). It maintains a memory of these objects from one frame to the next.
- Object Click-Effectiveness Prop Bias: Each tracked object has a "weight." When clicking an object causes a screen change, its weight increases, making it more likely to be clicked again. If the click does nothing, its weight decreases.
- Spontaneous Change Heuristic: code detects when an object changes (e.g., its color flips) without being directly acted upon. It interprets this as a critical game event and applies a large, temporary "buff" to the object's weight, making it a high-priority target on the next turn. This helps solve puzzles with indirect or delayed effects.
- Avoids Ineffective Actions: The agent remembers specific actions that resulted in no change for a given game state. It avoids repeating these known "dead-end" moves, preventing it from getting stuck in simple loops.
- Steps Budgeting: Stops if level is too long. Also stops if prev level is too long b/c EX longer steps per level.