Projetos
Ver no GitHub
Khrylx/PyTorch-RL
Sobre
Implementação em PyTorch de aprendizado por reforço profundo: métodos de gradiente de política (TRPO, PPO, A2C) e aprendizado por imitação generativa adversarial (GAIL). TRPO rápido com produto matriz-vetor de Fisher.
IA e aprendizado de máquinaO que você pode fazer
- Support discrete and continous action space.
- Support multiprocessing for agent to collect samples in multiple environments simultaneously. (x8 faster than single thread)
- Fast Fisher vector product calculation. For this part, Ankur kindly wrote a blog explaining the implementation details.
Crescimento medido de estrelas
- em 24 h
- 0
- em 7 dias
- -1
- em 15 dias
- 0
- em 1 mês
- -1
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
OriginalPyTorch implementation of reinforcement learning algorithms
This repository contains:
- policy gradient methods (TRPO, PPO, A2C)
- Generative Adversarial Imitation Learning (GAIL)
Important notes
- The code now works for PyTorch 0.4. For PyTorch 0.3, please check out the 0.3 branch.
- To run mujoco environments, first install mujoco-py and gym.
- If you have a GPU, I recommend setting the OMP_NUM_THREADS to 1 (PyTorch will create additional threads when performing computations which can damage the performance of multiprocessing. This problem is most serious with Linux, where multiprocessing can be even slower than a single thread):
export OMP_NUM_THREADS=1
Features
- Support discrete and continous action space.
- Support multiprocessing for agent to collect samples in multiple environments simultaneously. (x8 faster than single thread)
- Fast Fisher vector product calculation. For this part, Ankur kindly wrote a blog explaining the implementation details.
Policy gradient methods
- Trust Region Policy Optimization (TRPO) -> examples/trpo_gym.py
- Proximal Policy Optimization (PPO) -> examples/ppo_gym.py
- Synchronous A3C (A2C) -> examples/a2c_gym.py
Example
- python examples/ppo_gym.py --env-name Hopper-v2
Reference
Generative Adversarial Imitation Learning (GAIL)
To save trajectory
- python gail/save_expert_traj.py --model-path assets/learned_models/Hopper-v2_ppo.p
To do imitation learning
- python gail/gail_gym.py --env-name Hopper-v2 --expert-traj-path assets/expert_traj/Hopper-v2_expert_traj.p
Explore projetos relacionados
Carregando…