File size: 1,177 Bytes
c2240b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
license: mit
tags:
  - reinforcement-learning
  - ppo
  - openfront
  - game-ai
---

# OpenFront RL Agent

PPO-trained agent for [OpenFront.io](https://openfront.io), a multiplayer territory control game.

## Training Details

- **Algorithm:** PPO (Proximal Policy Optimization)
- **Architecture:** Actor-Critic with shared backbone (512→512→256)
- **Observation dim:** 96
- **Max neighbors:** 16
- **Maps:** plains, big_plains, ocean_and_land, half_land_half_ocean (random per episode)
- **Opponents:** N/A Easy bots
- **Parallel envs:** 16
- **Learning rate:** 0.00034
- **Rollout steps:** 1024
- **Updates trained:** 660
- **Global steps:** 86507520
- **Best mean reward:** -0.06284408122301102

## Final Training Metrics

- **Mean reward:** -0.5554914677888155
- **Mean episode length:** 7626.04
- **Loss:** -0.16370002925395966

## Usage

```python
from train import ActorCritic
import torch

model = ActorCritic(obs_dim=96, max_neighbors=16, hidden_sizes=[512, 512, 256])
model.load_state_dict(torch.load("best_model.pt", weights_only=True))
model.eval()
```

## Repository

Trained from [josh-freeman/openfront-rl](https://github.com/josh-freeman/openfront-rl).