Skip to content

Triangular peg-rotation mini-game from Machinarium, recreated with 12 nodes and three clickable rings. Colors and labels spin together. Built as a lightweight gym for AI agents to practice solving rotation puzzles.

Notifications You must be signed in to change notification settings

xXWarMachineRoXx/tripeg-solitaire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

machinarium-gitjib nammmer

Triangular Peg Puzzle

Platform Build

A single-file, menu-driven Pygame app for the triangular peg solitaire variant, with configurator, solver, and animated playback from the game machinarium

📦Downloads:

Download for Windows

Reference

Reference

Demo

Triangular Peg Puzzle – Solver & Animation Demo

Features

  • Unified menu:
    • Setup (Configurator): click pegs to cycle empty → red → green; save start layout.
    • Solve & Animation: runs the solver for the inner-triangle goal, shows steps under the board, play/pause, prev/next, and highlights the active ring.
    • Demo (Interactive): manual ring rotations on the live board.
  • Correct board edges and rotation directions.
  • HUD polish: centered status, step list (start state = step 0), non-flickering controls.

Install

pip install -r requirements.txt

Run

python main.py

Controls

Global

  • M / Esc: back to menu
  • R: reset the current mode to the configured start layout

Setup

  • Click node: cycle empty → red → green
  • R: reset to defaults
  • P: print mapping

Demo (Interactive)

  • Click 1: Ring A clockwise
  • Click 4: Ring A counter-clockwise
  • Click 3: Ring B counter-clockwise
  • Click 7: Ring B clockwise
  • Click 11: Ring C clockwise
  • Click 12: Ring C counter-clockwise

Solve & Animation

  • Prev / Next buttons: step backward/forward
  • Play button or Space: toggle auto-play
  • R: restart animation from the configured layout
  • Highlight: active ring nodes are outlined yellow each step
  • Status shows Step X/N | Next: <move> and a steps list under the board (step 0 = start state).

Goal

The solver aims to make the inner triangle {2, 6, 10, 9, 8, 5} all green.

Notes

  • Tested on Windows with Python + Pygame.
  • requirements.txt lists runtime dependencies.

Platform Build

Click this button to download

Download for Windows

No Python installation required.

About

Triangular peg-rotation mini-game from Machinarium, recreated with 12 nodes and three clickable rings. Colors and labels spin together. Built as a lightweight gym for AI agents to practice solving rotation puzzles.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages