How amirasenni21/intelligent-shooting-game works
This is a Pygame shooting-game simulation with teams of autonomous players. The principal workflow is to run the match, sense obstacles and other players, use a neural network to choose actions, and simulate movement and shooting. The single source file also contains fitness and genetic-algorithm logic; the README says genetic evolution is not applied during execution. The graph separates these runtime stages and the experimental evolution branch. Source excerpts are partial, so some relationships are omitted where calls are not shown.
Main entry points: Main.py Player state · Players Player sprites
Components 13
Match runtime
- Match loop
Main.py - Map and obstacles
Main.py - Player sprites
Images/Players
Autonomous agents
- Player state
Main.py - Ray-cast sensing
Main.py - Neural network
Main.py - Player movement
Main.py
Combat simulation
- Targeting and shooting
Main.py - Bullet simulation
Main.py
Evolution experiments
- Fitness scoring
Main.py - Parent selection
Main.py - Crossover and mutation
Main.py
Other components
- Game operator
Connections 13
- Game operator → Match loop: starts match
Main.py - Match loop → Map and obstacles: uses map
README.md - Match loop → Player state: updates players
Main.py - Player state → Player sprites: loads images
Main.py - Player state → Ray-cast sensing: casts rays
Main.py - Match loop → Neural network: requests actions
Main.py - Neural network → Player state: predicts actions
Main.py - Player state → Player movement: moves
Main.py - Player state → Targeting and shooting: targets and fires
Main.py - Targeting and shooting → Bullet simulation: creates bullets
Main.py - Match loop → Fitness scoring: tracks outcomes
Main.py - Fitness scoring → Parent selection: scores population
Main.py - Parent selection → Crossover and mutation: chooses parents
Main.py