| 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 (256→256→128) | |
| - **Map:** world | |
| - **Opponents:** 5 bots | |
| - **Episodes trained:** N/A | |
| - **Global steps:** 1536000 | |
| - **Best mean reward:** 122.21637367248535 | |
| ## Final Training Metrics | |
| - **Mean reward:** 102.8225530385971 | |
| - **Mean episode length:** 3839.8 | |
| - **Loss:** -0.008329648524522781 | |
| ## Usage | |
| ```python | |
| from train import ActorCritic | |
| import torch | |
| model = ActorCritic(obs_dim=78, max_neighbors=16) | |
| 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). | |