Package: ai-traineree
ai-trainereeThe intention is to have a zoo of Deep Reinforcment Learning methods and showcasing their application on some environments.Read more in the doc:ReadTheDocs AI-Traineree.Why another?The main reason is the implemention philosophy.
We strongly believe that agents should be emerged in the environment and not the other way round.
Majority of the popular implementations pass environment instance to the agent as if the agent was the focus point.
This might ease implementation of some algorithms but it isn't representative of the world;
agents want to control the environment but that doesn't mean they can/should.That, and using PyTorch instead of Tensorflow or JAX.Quick startTo get started with training your RL agent you need three things: an agent, an environment and a runner. Let's say you want to train a DQN agent on OpenAI CartPole-v1:fromai_traineree.agents.dqnimportDQNAgentfromai_traineree.runners.env_runnerimportEnvRunnerfromai_traineree.tasksimportGymTasktask=GymTask('CartPole-v1')agent=DQNAgent(task.obs_space,task.action_space)env_runner=EnvRunner(task,agent)scores=env_runner.run()or execute one of provided examples$ python -m examples.cart_dqnThat's it.InstallationPyPi (recommended)The quickest way to install package is throughpip.$ pip install ai-trainereeGit repository cloneAs usual with Python, the expectation is to have own virtual environment and then pip install requirements. For example,>python-mvenv.venv
>gitclonegit@github.com:laszukdawid/ai-traineree.git
>source.venv/bin/activate
>pythonsetup.pyinstallCurrent statePlaying gymOne way to improve learning speed is to simply show them how to play or, more researchy/creepy, provide a proper seed.
This isn't a general rule, since some algorithms train better without any human interaction, but since you're on GitHub... that's unlikely your case.
Currently there's a scriptinteract.pywhich uses OpenAI Gym's play API to record moves and AI Traineree to store them
in a buffer. Such buffers can be loaded by agents on initiation.This is just a beginning and there will be more work on these interactions.Requirement: Installpygame.AgentsShortProgressLinkFull nameDocDQNImplementedDeepMindDeep Q-learning NetworkDocDDPGImplementedarXivDeep Deterministic Policy GradientDocD4PGImplementedarXivDistributed Distributional Deterministic Policy GradientsDocTD3ImplementedarXivTwine Delayed Deep Deterministic policy gradientDocPPOImplementedarXivProximal Policy OptimizationDocSACImplementedarXivSoft Actor CriticDocTRPOarXivTrust Region Policy OptimizationRAINBOWImplementedarXivDQN with a few improvementsDocMulti agentsWe provide both Multi Agents agents entities and means to execute them against supported (below) environements.
However, that doesn't mean one can be used without the other.ShortProgressLinkFull nameDocIQLImplementedIndependent Q-LearnersDocMADDPGImplementedarXivMulti agent DDPGDocLoggersSupports using Tensorboard (via PyTorch'sSummaryWriter) andNeptuneto display metrics. Wrappers are provided asTensorboardLoggerandNeptuneLogger.Note: In order to use Neptune one needs to installneptune-client(pip install neptune-client).EnvironmentsNameProgressLinkOpenAI Gym - ClassicDoneOpenAI Gym - AtariDoneOpenAI Gym - MuJoCoNot interested.PettingZooInitial supportPage/GitHubUnity MLSomehow supported.PageMAME Linux emulatorInterested.Official pageDevelopmentWe are open to any contributions. If you want to contribute but don't know what then feel free to reach out (see Contact below).
The best way to start is through updating documentation and adding tutorials.
In addition there are many other things that we know of which need improvement but also plenty that we don't know of.Setting up development environment requires installingdevandtestextra packages.
Thedevextras are for mainly for linting and formatting, and thetestis for running tests.
We recommend usingpipso to install everything requires for development run$pipinstall-e.[dev,test]Once installed, please configure your IDE to useblackas formatter,pycodestyleas linter,
andisortfor sorting imports. All these are included in thedevextra packages.ContactShould we focus on something specificallly? Let us know by opening a feature requestGitHub issueor contacting throughai-traineree@dawid.lasz.uk.Citing project@misc{ai-traineree,
  author ={Laszuk, Dawid},
  title ={AI Traineree: Reinforcement learning toolset},
  year ={2020},
  publisher ={GitHub},
  journal ={GitHub repository},
  howpublished ={\url{https://github.com/laszukdawid/ai-traineree}},}