Pulting86/ML-Agents-SoccerTwos
By Pulting86 · ↓ 2 · ♥ 0 · Updated 2024-12-20
What's in this repo
This page lists the files in Pulting86/ML-Agents-SoccerTwos, including SoccerTwos.onnx, SoccerTwos-1499902.onnx, SoccerTwos-167966.onnx and more.
- 9 ONNX models (.onnx files)
- 28 files, including 9 .onnx, 9 .pt, 3 .0, 3 .json, 1 .md, 1 .yaml
- Last updated 2024-12-20
ONNX files
| File | Size | Download |
|---|---|---|
| SoccerTwos.onnx | — | Download |
| SoccerTwos/SoccerTwos-1499902.onnx | — | Download |
| SoccerTwos/SoccerTwos-167966.onnx | — | Download |
| SoccerTwos/SoccerTwos-1929180.onnx | — | Download |
| SoccerTwos/SoccerTwos-1941340.onnx | — | Download |
| SoccerTwos/SoccerTwos-499956.onnx | — | Download |
| SoccerTwos/SoccerTwos-65330.onnx | — | Download |
| SoccerTwos/SoccerTwos-78306.onnx | — | Download |
| SoccerTwos/SoccerTwos-999700.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
ML-Agents SoccerTwos Training
Este repositorio contiene los pasos necesarios para entrenar un agente en el entorno SoccerTwos utilizando Unity ML-Agents.
Requisitos
- Python 3.7 o superior
- Unity ML-Agents
- TensorFlow
- Acceso al entorno
SoccerTwos(archivo.zipdescargable)
Instalación
-
Clona el repositorio de ML-Agents:
git clone --depth 1 https://github.com/Unity-Technologies/ml-agents -
Instala los paquetes necesarios:
Dirígete a la carpeta clonada y ejecuta:
cd ml-agents pip3 install -e ./ml-agents-envs pip3 install -e ./ml-agents
Configuración del entorno de entrenamiento
-
Crea la carpeta para el entrenamiento:
mkdir -p ./train-soccer -
Descarga el entorno SoccerTwos:
Utiliza el siguiente script para descargar el archivo .zip del entorno y extraerlo:
import gdown file_id = '1KuqBKYiXiICU4kNMqEzhgyuPF5_45CL' gdown.download(f'https://drive.google.com/uc?export=download&id={file_id}', './train-soccer/SoccerTwos.zip', quiet=False)
Extrae el archivo:
unzip -d ./train-soccer ./train-soccer/SoccerTwos.zip
-
Cambia los permisos del archivo extraído:
chmod -R 755 ./train-soccer/SoccerTwos/SoccerTwos.x86_64
Configuración de parámetros de entrenamiento
Crea un archivo YAML con los parámetros de entrenamiento. Un ejemplo es el siguiente:
behaviors:
SoccerTwos:
trainer_type: poca
hyperparameters:
batch_size: 4096
buffer_size: 40960
learning_rate: 0.0002
beta: 0.01
epsilon: 0.15
lambd: 0.92
num_epoch: 5
learning_rate_schedule: linear
network_settings:
normalize: true
hidden_units: 1024
num_layers: 3
vis_encode_type: simple
reward_signals:
extrinsic:
gamma: 0.995
strength: 1.0
keep_checkpoints: 10
max_steps: 1000000
time_horizon: 1200
summary_freq: 5000
self_play:
save_steps: 50000
team_change: 300000
swap_steps: 3000
play_against_latest_model_ratio: 0.6
initial_elo: 1200.0
Y guardarlo en la carpeta 'train-soccer'
with open('./train-soccer/SoccerTwos.yaml', 'w') as file:
file.write(yaml_content)
Entrenamiento del agente
Inicia el entrenamiento con el siguiente comando:
mlagents-learn ./train-soccer/SoccerTwos.yaml --env=./train-soccer/SoccerTwos/SoccerTwos.x86_64 --run-id="SoccerTwosNew" --no-graphics --force
Model info
Created: 2024-12-19
Updated: 2024-12-20
View on Hugging FaceFiles (28)
Related models
More from Pulting86
No other models by this author.