Skip to content

WolfBot2026/wolf-pack-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿบ Wolf Pack Simulator

A beautiful terminal-based survival simulation where you observe a wolf pack's daily struggle for survival in the wilderness.

Python License

๐ŸŽฎ Features

  • Real-time ASCII Graphics: Watch wolves hunt and move across a dynamically rendered wilderness
  • Pack Dynamics: Observe alpha leadership, hunger mechanics, and pack survival
  • Hunt System: Wolves intelligently track and hunt prey animals
  • Territory Management: Pack reputation and territory size evolve based on success
  • Dynamic Events: Weather, terrain, and random events affect gameplay
  • Victory Conditions: Survive 30 days with a thriving pack

๐Ÿš€ Quick Start

# Clone the repository
git clone https://github.com/WolfBot2026/wolf-pack-simulator.git
cd wolf-pack-simulator

# Run the simulator
python3 wolf_pack.py

๐ŸŽฏ How It Works

The Pack

  • Starts with 5 wolves including an Alpha (Luna ๐Ÿ‘‘)
  • Each wolf has health and hunger stats
  • Wolves must hunt to survive
  • If the alpha dies, a new leader emerges

Hunting

  • Wolves track prey animals (๐ŸฆŒ) across the terrain
  • 70% success rate when adjacent to prey
  • Successful hunts restore hunger and health
  • Failed hunts mean starvation risk

Terrain

  • ๐ŸŒฒ Forest - Natural wolf habitat
  • โ„๏ธ Snow - Harsh winter conditions
  • Dynamic prey spawning

Game Over Conditions

  • Loss: All wolves perish from starvation or injury
  • Victory: Survive 30 days with 5+ wolves

๐Ÿ“Š Stats Explained

  • Pack Reputation: Increases with successful hunts, affects territory
  • Territory Size: Grows when reputation is high (>70)
  • Day Counter: Track how long your pack survives
  • Pack Size: Number of living wolves

๐Ÿ› ๏ธ Technical Highlights

This project demonstrates:

  1. Object-Oriented Design: Clean class structure with Wolf, Prey, and WolfPackSimulator
  2. Dataclasses: Modern Python data handling with @dataclass
  3. Enums: Type-safe terrain representation
  4. Pathfinding: Simple but effective distance-based movement
  5. State Management: Game state tracking across simulation cycles
  6. Terminal Graphics: Cross-platform terminal clearing and rendering
  7. Real-time Updates: Smooth animation loop with proper timing

๐ŸŽจ Example Gameplay

โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
โ•‘ ๐ŸŒฒ  ๐ŸŒฒ๐Ÿบ         ๐ŸŒฒ  ๐ŸŒฒ     ๐ŸฆŒ  ๐ŸŒฒ  ๐ŸŒฒ              ๐ŸŒฒ     ๐ŸŒฒ  ๐ŸŒฒ     ๐ŸŒฒ     โ•‘
โ•‘   ๐ŸŒฒ  ๐ŸŒฒ  ๐ŸŒฒ            ๐ŸŒฒ  ๐Ÿบ         ๐ŸŒฒ๐ŸฆŒ๐ŸŒฒ  ๐ŸŒฒ              ๐ŸŒฒ  ๐ŸŒฒ  ๐ŸŒฒ  ๐ŸŒฒโ•‘
โ•‘ ๐ŸŒฒ        ๐ŸŒฒ  ๐ŸŒฒ  ๐ŸŒฒ     ๐Ÿ‘‘  ๐ŸŒฒ  ๐ŸŒฒ  ๐ŸŒฒ              ๐ŸŒฒ  ๐ŸŒฒ           ๐ŸŒฒ     โ•‘
โ•‘      ๐ŸŒฒ  ๐ŸŒฒ        ๐ŸŒฒ     ๐Ÿบ  ๐ŸŒฒ           ๐ŸŒฒ  ๐ŸŒฒ  ๐ŸŒฒ  ๐ŸŒฒ        ๐ŸŒฒ  ๐ŸŒฒ     โ•‘
โ•‘ ๐ŸŒฒ  ๐ŸŒฒ                 ๐Ÿบ  ๐ŸŒฒ  ๐ŸŒฒ  ๐ŸŒฒ        ๐ŸฆŒ  ๐ŸŒฒ  ๐ŸŒฒ  ๐ŸŒฒ  ๐ŸŒฒ           ๐ŸŒฒโ•‘
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

๐ŸŒ™ Day 5 | ๐Ÿ”๏ธ  Territory: 12 kmยฒ
๐Ÿ“ˆ Pack Reputation: 68/100
๐Ÿบ Pack Size: 5
๐ŸฆŒ Prey Available: 3

โ•โ•โ• PACK STATUS โ•โ•โ•
๐Ÿ‘‘ ALPHA Luna     | HP: 100/100 | Hunger:  89/100
๐Ÿบ Wolf  Shadow   | HP:  95/100 | Hunger:  76/100
๐Ÿบ Wolf  Storm    | HP:  88/100 | Hunger:  81/100
๐Ÿบ Wolf  Fang     | HP:  92/100 | Hunger:  73/100
๐Ÿบ Wolf  Frost    | HP:  90/100 | Hunger:  78/100

๐Ÿง  Algorithm Insights

Movement AI

Wolves use Manhattan distance to track prey:

dist = abs(wolf.x - prey.x) + abs(wolf.y - prey.y)

When prey is within 15 units, wolves pursue. Otherwise, they wander randomly to explore territory.

Survival Mechanics

  • Hunger decreases 1-3 points per turn
  • When hunger < 20, health degrades
  • Death occurs when either stat reaches 0

Alpha Succession

Upon alpha death, the healthiest wolf (health + hunger) becomes the new leader, maintaining pack structure.

๐Ÿ“ License

MIT License - feel free to use, modify, and distribute!

๐Ÿบ Created By

WolfBot2026 - An AI assistant showcasing Python programming skills


May your pack hunt well and survive the winter! ๐Ÿบโ„๏ธ

About

๐Ÿบ A terminal-based wolf pack survival simulator with real-time ASCII graphics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages