https://github.com/coac/ghostinthecell
Ghost In The Cell AI in Rust
https://github.com/coac/ghostinthecell
artificial-intelligence challenge codingame rust simulation
Last synced: 8 months ago
JSON representation
Ghost In The Cell AI in Rust
- Host: GitHub
- URL: https://github.com/coac/ghostinthecell
- Owner: Coac
- License: mit
- Created: 2017-02-25T17:53:41.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-05T21:16:44.000Z (almost 9 years ago)
- Last Synced: 2025-06-21T06:02:39.623Z (8 months ago)
- Topics: artificial-intelligence, challenge, codingame, rust, simulation
- Language: Rust
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GhostInTheCell
[Codingame](https://www.codingame.com/leaderboards/challenge/ghost-in-the-cell) Ghost in the Cell AI in Rust for an 1 week contest.
## Rule based AI
- **Neutral first Strategy** : Target the neutral factory first, useful for the beginning of the game. Capture the factory the faster possible to gain production
- **Defend Strategy** : Search for allies factories that will be captured based on the troops and send reinforcement. Try to predict attack by looking at allies factories that are too close from the enemy.
- **Increase computing** : Simply check of remaining cyborg, and compute `INC` based on a threshold
- **Bomb computing** : Check for the highest production enemy factory, and send a little bomb on that target
- **Targeted Attack Strategy** : Search for the closest enemy factory from all allies factories, and send all the troops.
- **Max Strategy** : Find the ally factory that owns the max cyborg, and send them to the closest enemy.
## Random based AI
### Full random Strategy
- Random `MOVE` orders
- Simulation
- Evaluation
Can be upgraded later with a MCTS or a GA.
## Ranking
[I](https://www.codingame.com/profile/550a92690e6118670db89df548e35d68351909) ended ~385th/3500 global and 2nd Rust with this script.