PracticeSnake Game
0
0.000
Python
Loading...
Ln 1, Col 1
Python
Spaces: 4
UTF-8
Game: Connecting...
0
0.000
Score: 0
Step: 0
Episode: 0
0/0
Instructions
Action Space
action_space = [Direction.FRONT, Direction.RIGHT, Direction.LEFT]
State Information
0 Danger front
1 Danger right
2 Danger left
3 Moving
4 Moving
5 Moving
6 Moving
7 Food left
8 Food right
9 Food up
10 Food down
Quick Tips
- Default direction: RIGHT
- Use await for async operations
- Game ends on wall/body collision
- Reach AvgScore ≥ 20 to advance
- 100 episodes available for training
Example:
game_over, score, reward = await move(Direction.FRONT.value) new_state = get_state()