Contributing¶
Adding an algorithm¶
CleanRUA follows CleanRL: one file implements one algorithm, and everything the algorithm needs is in that file.
- Decide whether it is a new algorithm. A change to what the model sends each turn, or to the interaction
loop, is a new algorithm and gets a new file. A numeric setting or an on/off switch is a hyperparameter in
Args, not a new file. Do not add several tricks to one algorithm. - Name the file
<paradigm>_<environment>.py, for examplecode_robodojo.py. A variant of a paradigm adds a word, for exampledirect_memory_robodojo.py. - Copy, do not import. Start from the closest existing file and change what differs. Algorithm files do not import from each other, so each can be read on its own.
- Keep the environment generic. Tools are
@Toolmethods on the agent'sgym.Wrapper. The environment incleanrua_utils/contains only simulation, with no tools, prompts or models. - Cite the source. The first lines of the file name the method it follows.
- Test it. Add CPU tests in
tests/usingFakeRoboDojofromtests/test_direct_robodojo.py, then run a short GPU check on a task that already succeeds with another agent.
python -m unittest discover -s tests -q # CPU: no simulator or model
python tests/smoke_robodojo.py --native-root /path/to/RoboDojo # GPU: native control, no model
Building this site¶
Acknowledgements¶
CleanRUA is inspired by CleanRL, RoboSimStudio and uni-robot-agent. It uses RoboDojo for simulation and XPolicyLab for action models. We thank their authors.