imrl-hf

# Hierarchy Fencer

https://github.com/yck1130/imrl-hf

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.2%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

# Hierarchy Fencer

Basic Info
  • Host: GitHub
  • Owner: YCK1130
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 148 MB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 2 years ago · Last pushed over 2 years ago
Metadata Files
Readme Contributing Funding License Code of conduct Citation

README.md

Hierarchy Fencer

This repository is the source code for A Two-Step Approach for Physically Competitive Sports: A Case Study on Fencing, the final project for the reinforcement leaning class in NTU(CommE5069). It is built on top of Gymnasium by the Farama Foundation and branch DAC of DeepRL by Shangtong Zhang.

The environment should be installed and executed on Python 3.11.

W&B is used for logs and it will automatically create a project "Fencer".

Installation

After cloning the repository, go into the directory and use the command below to install neccessary libraries:

pip install -r requirements.txt pip install -e .

Training

This repository currently supports training methods of SAC, TD3, A2C, PPO, and DAC (Double Actor-Critic by S. Zhang). All algorithms except for DAC are also supported by StableBaselines3.

``` cd gymnasium/

Step 1

Algorithms in StableBaselines3

python main.py -t

'AlgorithmName' can be SAC, TD3, PPO, or A2C

e.g. python main.py PPO -t

Double Actor-Critics

python DAC.py DAC -t

Step 2 (The two models should be trained by same method)

Algorithms in StableBaselines3

python main.py -t [-s2 /path/to/second/model]

Double Actor-Critics

python DAC.py DAC -t [-s2 /path/to/second/model] ```

In the last command, the file extension of the path must be removed. For example, models/0000test/DAC100000 is used instead of models/0000test/DAC100000.model .

The model for the command above will be stored in gymnasium/models/[runid]/[algorithmname]_[steps].zip or gymnasium/models/[runid]/[algorithmname]_[steps].model .

Testing

```

Play with itself (with first stage stationary)

Algorithms in StableBaselines3

python main.py -s /path/to/model

Double Actor-Critics

python DAC.py DAC -s /path/to/model

Play with another model (The two models should be trained by same method)

Algorithms in StableBaselines3

python main.py -s /path/to/model -s2 /path/to/second/model

Double Actor-Critics

python DAC.py DAC -s /path/to/model -s2 /path/to/second/model ```

In the last command, the file extension of the path must also be removed.

Owner

  • Login: YCK1130
  • Kind: user

GitHub Events

Total
Last Year

Dependencies

docs/requirements.txt pypi
  • furo *
  • moviepy *
  • myst-parser *
  • pygame *
  • sphinx *
  • sphinx-autobuild *
  • sphinx_gallery 4006662c8c1984453a247dc6d3df6260e5b00f4b
  • sphinx_github_changelog *
gymnasium/requirements.txt pypi
  • gymnasium *
  • mujoco <3
  • stable-baselines3 *
  • tensorboard *
  • wandb *
pyproject.toml pypi
  • cloudpickle >=1.2.0
  • farama-notifications >=0.0.1
  • importlib-metadata >=4.8.0; python_version < '3.10'
  • numpy >=1.21.0
  • typing-extensions >=4.3.0
requirements.txt pypi
  • gymnasium *
  • mujoco <3
  • scikit-image *
  • stable-baselines3 *
  • tensorboard *
  • tensorboardX *
  • tqdm *
  • wandb *
setup.py pypi
.github/workflows/build-docs.yml actions
  • JamesIves/github-pages-deploy-action v4 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/build-publish.yml actions
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/build.yml actions
  • actions/checkout v3 composite
.github/workflows/docs-manual-versioning.yml actions
  • JamesIves/github-pages-deploy-action v4 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/docs-versioning.yml actions
  • JamesIves/github-pages-deploy-action v4 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • dawidd6/action-get-tag v1 composite
.github/workflows/pre-commit.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite