ai-minesweeper-discovery-framework

A constraint-satisfaction engine that turns any knowledge domain into a Minesweeper-style board of hypotheses and uncovers true patterns through active learning loops.

https://github.com/genghisdarb/ai-minesweeper-discovery-framework

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.5%) to scientific vocabulary
Last synced: 6 months ago · JSON representation

Repository

A constraint-satisfaction engine that turns any knowledge domain into a Minesweeper-style board of hypotheses and uncovers true patterns through active learning loops.

Basic Info
  • Host: GitHub
  • Owner: GenghisDarb
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 92 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 2
  • Releases: 0
Created 12 months ago · Last pushed 9 months ago
Metadata Files
Readme Changelog License Citation Security Roadmap

README.md

CI License

[1.0.0] - 2025-07-13

  • Full Streamlit UI with copy/export/chat/confidence history
  • Dynamic board expansion and visual feedback loop
  • Debug matrix resolved (Tiers 13)
  • Fractal -brot visualizer and prime/periodic examples included
  • Constraint Satisfaction: Logical deduction from revealed numbers
  • Risk Assessment: Probabilistic analysis of hidden cells
  • Meta-Cell Confidence: Adaptive confidence tracking and threshold adjustment
  • TORUS Theory Integration: Cyclical feedback for continuous improvement

Core Components

```python from ai_minesweeper import Board, RiskAssessor, ConstraintSolver

Initialize components

board = Board(width=9, height=9, mine_count=10) solver = ConstraintSolver()

Get AI recommendation

solution = solver.solve_step(board) print(f"AI recommends: {solution['action']} at {solution['position']}") print(f"Confidence: {solution['confidence']:.3f}") ```

Example Output

``` AI Minesweeper - -Recursive Form v1.1.0 Board: 9x9, Mines: 10

Move 5: AI reveals at (3, 4) (confidence: 0.847) Reason: Safe reveal (risk=0.156)

-Cycle Progress: 12 Solver Iterations: 5 Active Constraints: 3 Confidence Trend: +0.124

VICTORY! Board solved successfully! Moves made: 23 Time elapsed: 0.3 seconds Final confidence: 0.923 ```

Usage Examples

Interactive CLI Session

```bash $ python src/ai_minesweeper/cli.py --meta --interactive

AI Minesweeper - Interactive Mode Commands: 'auto' for AI move, 'solve' for full auto-solve, 'quit' to exit Manual moves: 'r x y' to reveal, 'f x y' to flag

Enter command: auto AI reveals at (4, 4) (confidence: 0.756) Reason: Safe reveal (risk=0.189)

Enter command: solve Auto-solving with AI... VICTORY! Board solved successfully! ```

Streamlit Web Interface

The web interface provides: - Interactive Board: Click to reveal/flag cells or let AI make moves - Real-time Statistics: Confidence trends and performance metrics - Visualization Panels: Risk analysis and -cycle progression - Move History: Complete log of all actions with downloadable CSV

Technical Details

-Recursive Algorithm

The -recursive algorithm implements a feedback loop where:

  1. Decision Making: Constraint solver generates recommendations
  2. Confidence Assessment: Meta-cell tracker evaluates decision quality
  3. Risk Adjustment: Dynamic thresholds adapt based on performance
  4. Cyclical Learning: TORUS theory provides long-term improvement

Risk Assessment Features

  • Coordinate-Keyed Maps: Consistent test compatibility
  • Multi-Constraint Analysis: Handles overlapping logical constraints
  • Probabilistic Refinement: Bayesian-inspired risk calculations
  • Cache Optimization: Efficient recalculation with state changes

Meta-Cell Confidence

The confidence system tracks: - Success/Failure Rates: Per decision type (reveal, flag, deduce) - Trend Analysis: Short and long-term performance patterns - Adaptive Thresholds: Dynamic risk tolerance adjustment - -Cycle Integration: Cyclical confidence modulation

Performance

Benchmark Results

| Board Size | Mine Density | Success Rate | Avg Moves | Avg Time | |------------|--------------|--------------|-----------|----------| | 9x9 | 12.3% | 94.7% | 23.4 | 0.31s | | 16x16 | 15.6% | 89.2% | 67.8 | 1.24s | | 16x30 | 20.6% | 82.6% | 178.3 | 4.17s |

Key Metrics

  • -Recursive Depth: Typically 2-4 levels for complex scenarios
  • Confidence Convergence: Usually stabilizes within 10-15 moves
  • Cache Hit Rate: >85% for most game states
  • Memory Usage: <50MB for standard boards

Development

Project Structure

``` src/aiminesweeper/ _init.py # Package initialization board.py # Game board with -recursive tracking riskassessor.py # Risk analysis engine constraintsolver.py # Main AI solver logic cli.py # Command line interface uiwidgets.py # UI components and visualization metacellconfidence/ # Confidence tracking system _init.py betaconfidence.py # -confidence tracker policywrapper.py # Risk/confidence integration

tests/ # Test suite streamlit_app.py # Web interface requirements.txt # Dependencies pyproject.toml # Project configuration ```

Running Tests

```bash

Run all tests

python -m pytest tests/ -v

Run with coverage

python -m pytest tests/ --cov=src/ai_minesweeper

Run specific test category

python -m pytest tests/testbasicfunctionality.py -v ```

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes with tests
  4. Run the test suite (pytest tests/)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

TORUS Theory Background

The TORUS (Topological Optimization through Recursive Unified Strategies) theory provides the mathematical foundation for the -recursive approach:

  • Cyclical Learning: Confidence patterns follow toroidal topology
  • Recursive Optimization: Self-improving decision algorithms
  • Unity Strategies: Integrated constraint and probability methods
  • Topological Stability: Bounded confidence evolution

Future Enhancements

Planned Features (v1.2.0)

  • -brot Visualization: Fractal patterns in solving behavior
  • Advanced TORUS Integration: Multi-dimensional confidence spaces
  • Machine Learning Enhancement: Neural network probability refinement
  • Multiplayer Support: Collaborative solving modes

Research Directions

  • Quantum-Inspired Algorithms: Superposition-based cell analysis
  • Swarm Intelligence: Multi-agent solving approaches
  • Temporal Dynamics: Time-based confidence evolution
  • Cross-Game Learning: Knowledge transfer between board configurations

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • TORUS theory mathematical foundations
  • -recursive algorithm research community
  • Open source minesweeper solving projects
  • Streamlit team for excellent web framework

Contact


Made with and lots of by the AI Minesweeper Discovery Framework Team

Owner

  • Login: GenghisDarb
  • Kind: user