Saravanan666/pypi-org huggingface dataset:
Package: gymnastics
A "gym" style toolkit for building lightweight Neural Architecture Search systems. I know, the name is awful.InstallationpipinstallgymnasticsIf you want to use NAS-Bench-101, follow the instructionshere.OverviewOver the course of the final year of my PhD I worked a lot on Neural Architecture Search (NAS) and built a bunch of tooling to make my life easier. This is an effort to standardise the various features into a single framework and provide a "gym" style toolkit for comparing various algorithms.The key use cases for this library are:test out new predictors on various NAS benchmarksvisualise the cells/graphs of your architecturesadd new operations to NAS spacesadd new backbones to NAS spacesThe framework revolves around three key classes:ModelProxySearchSpaceObligatory builder pattern README exampleUsinggymnasticswe can very easily reconstruct NAS spaces (the goal being that it's easy to define new and exciting ones).For example, here's how easy it is to redefine the NATS-Bench / NAS-Bench-201 search space:fromgymnastics.searchspaceimportSearchSpace,CellSpace,Skeletonfromgymnastics.searchspace.opsimportConv3x3,Conv1x1,AvgPool2d,Skip,Zeroizesearch_space=SearchSpace(CellSpace(ops=[Conv3x3,Conv1x1,AvgPool2d,Skip,Zeroize],num_nodes=4,num_edges=6),Skeleton(style=ResNetCIFAR,num_blocks=[5,5,5],channels_per_stage=[16,32,64],strides_per_stage=[1,2,2],block_expansion=1),)# create an accuracy predictorfromgymnastics.proxiesimportNASWOTfromgymnastics.datasetsimportCIFAR10Loaderproxy=NASWOT()dataset=CIFAR10Loader(path="~/datasets/cifar10",download=False)minibatch,_=dataset.sample_minibatch()best_score=0.0best_model=None# try out 10 random architectures and save the best oneforiinrange(10):model=search_space.sample_random_architecture()y=model(minibatch)score=proxy.score(model,minibatch)ifscore>best_score:best_score=scorebest_model=modelbest_model.show_picture()Which prints:Have a look inexamples/for more examples.NAS-BenchmarksIf you have designed a new proxy for accuracy and want to test its performance, you can use the benchmarks available inbenchmarks/.The interface to the benchmarks is exactly the same as the above example forSearchSpace.For example, here we score networks from the NDS ResNet space using random input data:importtorchfromgymnastics.benchmarksimportNDSSearchSpacefromgymnastics.proxiesimportProxy,NASWOTsearch_space=NDSSearchSpace("~/nds/data/ResNet.json",searchspace="ResNet")proxy:Proxy=NASWOT()minibatch:torch.Tensor=torch.rand((10,3,32,32))scores=[]for_inrange(10):model=search_space.sample_random_architecture()scores.append(proxy.score(model,minibatch))Additional supported operationsIn addition to the standard NAS operations we include a few more exotic ones, all in various states of completion:OpPaperNotesconv-params: kernel sizegconv-+ params: groupdepthwise separablepdf+ no extra params neededmixconvpdf+ params: needs a list of kernel_sizesoctaveconvpdfDon't have a sensible way to include this as a single operation yetshiftpdfno params neededViTpdfFused-MBConvpdfLambdapdf
Package: gym-notices
Gym NoticesThis repository hosts notices for Gym that may be displayed on import on internet connected systems, in order to give notices if versions have major reproducibility issues, are very old and need to be upgraded (e.g. there's been issues with researchers using 4 year old versions of Gym for no reason), or other similar issues. If you're using a current version of Gym and nothing extraordinary happens, you'll never see a message from this, but I want start including the option to prevent future issues. By pulling the error messages from a public git repository, there's absolute transparency and versioning in the process.
Package: gym-novel-gridworlds
Gym Novel GridworldsGym Novel Gridworlds are environments forOpenAI Gym.Installationgit clone https://github.com/gtatiya/gym-novel-gridworlds.git
cd gym-novel-gridworlds
pip install -e .If you prefer, you can install directly fromPyPI:pip install gym-novel-gridworldsDevelopment EnvironmentPython 3.7.4and following packages were used for development:Python Packagespip install gym==0.17.2
pip install keyboard==0.13.4
pip install matplotlib==3.1.2
pip install numpy==1.16.5
pip install stable_baselines=2.10.0
pip install tensorflow-gpu==1.14.0Runningimport gym
import gym_novel_gridworlds

env = gym.make('NovelGridworld-v0')

done = False
while not done:
        env.render()
        action = env.action_space.sample()
        obs, reward, done, info = env.step(action)

env.close()Enjoy a Trained AgentIf the trained agent exists, then you can see it in action using:python enjoy.py -env <env id> -episodes <number of episodes>For example, enjoy PPO2 on NovelGridworld-v0 during 10 episodes:python enjoy.py -env NovelGridworld-v0 -episodes 10Play it yourselfPlay the game using keyboard interfacecd tests
python keyboard_interface.pyEnvironmentsNovelGridworld-v0NovelGridworld-v1NovelGridworld-v2NovelGridworld-v3NovelGridworld-v4NovelGridworld-v5
Package: gym-panda
gym-pandaOpenaAI Gym Franka Emika Panda robot grasping environment implemented with PyBulletLinksGitHub:https://github.com/mahyaret/gym-pandaPyPI:https://pypi.org/project/gym-panda/Documentation:https://www.etedal.net/2020/04/pybullet-panda_2.htmlIssue Tracker:https://github.com/mahyaret/gym-panda/issuesDownload:https://pypi.org/project/gym-panda/#filesInstallInstall withpip:pip install gym-pandaOr, install from source:git clone https://github.com/mahyaret/gym-panda.git
cd gym-panda
pip install .Basic UsageRunning an environment:importgymimportgym_pandaenv=gym.make('panda-v0')env.reset()for_inrange(100):env.render()obs,reward,done,info=env.step(env.action_space.sample())# take a random actionenv.close()Running a PD control HACK!importgymimportgym_pandaenv=gym.make('panda-v0')observation=env.reset()done=Falseerror=0.01fingers=1info=[0.7,0,0.1]k_p=10k_d=1dt=1./240.# the default timestep in pybullet is 240 Hzt=0fori_episodeinrange(20):observation=env.reset()fingers=1fortinrange(100):env.render()print(observation)dx=info[0]-observation[0]dy=info[1]-observation[1]target_z=info[2]ifabs(dx)<errorandabs(dy)<errorandabs(dz)<error:fingers=0if(observation[3]+observation[4])<error+0.02andfingers==0:target_z=0.5dz=target_z-observation[2]pd_x=k_p*dx+k_d*dx/dtpd_y=k_p*dy+k_d*dy/dtpd_z=k_p*dz+k_d*dz/dtaction=[pd_x,pd_y,pd_z,fingers]observation,reward,done,info=env.step(action)ifdone:print("Episode finished after{}timesteps".format(t+1))breakenv.close()Developmentclone the repo:gitclonehttps://github.com/mahyaret/gym-panda.gitcdgym-pandaCreate/activate the virtual environment:pipenvshell--python=python3.6Install development dependencies:pipenvinstall--dev
Package: gym_ple
gym-ple******PyGame Learning Environment (PLE) is a learning environment, mimicking the Arcade Learning Environment interface, allowing a quick start to Reinforcement Learning in Python.The goal of PLE is allow practitioners to focus design of models and experiments instead of environment design.This package allows to use PLE as a gym environment.Installing everything---------------------gym_ple requires PLE, to install PLE clone the repo and install with pip... code:: shellgit clone https://github.com/ntasfi/PyGame-Learning-Environment.gitcd PyGame-Learning-Environment/pip install -e .PLE requires PyGame installed:On OSX:.. code:: shellbrew install sdl sdl_ttf sdl_image sdl_mixer portmidi  # brew or use equivalent meansconda install -c tlatorre pygame=1.9.2 # using AnacondaOn Ubuntu 14.04:.. code:: shellapt-get install -y python-pygameMore configurations and installation details on: http://www.pygame.org/wiki/GettingStarted#Pygame%20InstallationAnd finally clone and install this package.. code:: shellgit clone https://github.com/lusob/gym-ple.gitcd gym-ple/pip install -e .You also can install it from PyPi:.. code:: shellpip install gym_pleExample=======Run ``python example.py`` file to play a PLE game (flappybird) with a random_agent (you need to have installed openai gym).
Package: gym-prismata
Status:Early DevelopmentRequires the 'prismataengine' module, which is a Python3 wrapper for the C++ code developed and published by David Churchill/Lunarch Studios [...]Prismata engine unlikely to change in a way that breaks everything, but possible
Currently only baseset confidently supported, but random units should be possible
Methods for the state and action space expected to change
Representation for state and action space not ideal; dimension of the action space dynamic.
2-Player game. Currently 'Active Player' is just part of the state output.
Currently only extremely sparse rewards (Victory/No Victory); will be updatedInfo about Prismata:
2 Player
Perfect information
Deterministic
Random units at initialization with very different abilities
Complicated action space, large and dynamic even within a gameInstallationpipinstallgym_prismata
Package: gym-pycolab
Gym PyColabgyminterface forpycolabgames.Extraterrestrial Marauders$pipinstallgym-pycolabAPIExampleInherit fromgym_pycolab.PyColabEnvto make agym.Envversion. Also seepycolab_games.pyfor more examples.importgym_pycolabfromgymimportspacesclassMyGameEnv(gym_pycolab.PyColabEnv):"""A pycolab game env."""def__init__(self,max_iterations=10,default_reward=-1.):super(MyGameEnv,self).__init__(max_iterations=max_iterations,default_reward=default_reward,action_space=spaces.Discrete(4))defmake_game(self):returnmy_gamedefmake_colors(self):return{'#':(0,0,255)}env=MyGameEnv()state=env.reset()state,reward,done,info=env.step(0)Games and EnvsIncludes most of the pycolab example games (withgym.make(game)orgym_pycolab.{game}Env(...)):Ordeal-v0(ordeal)WarehouseManager-v{0,1,2}(warehouse_manager)FluvialNatation-v0(fluvial_natation)ExtraterrestrialMarauders-v0(extraterrestrial_marauders)ShockWave-v{0,1}(shockwave)Aperture-v{0,1,2}(aperture)Apprehend-v0(apprehend)BetterScrollyMaze-v{0,1,2}(better_scrolly_maze)ChainWalk-v0(classics/chain_walk)CliffWalk-v0(classics/cliff_walk)FourRooms-v0(classics/four_rooms)Running an ExampleRendering theExtraterrestrialMarauders-v0with random actions:$python-mgym_pycolab.pycolab_games--gameextraterrestrial_maraudersDevelopmentDevelopment is started withpipenv.$pipenvinstall
$pipenvshellTesting$python-mgym_pycolab.pycolab_env_test
Package: gym-qRacing
Deep Q-RacingImproving race strategy decision-making in motorsports through self-learning deep neural networksDeep Q-Racing is a research project into the potential of using Reinforcement Learning for automating
race simulations and thus improving the comprehensiveness of results as-well as the possible amount of runs.🎓 BackgroundView abstractOne decisive factor in the outcome of races in circuit motorsports is the race strategy.
The strategic potential of this strategy hereby stems from the timing of pit stops.
These stops become neccessary, as fuel is consumed and tires decrease in performance over the course of a race.
Deciding on a pit stop to replace these tires with a new set and refueling the car for the desired stint length contracts these affects.
Such a stop also induces drawback in form of time loss, as a speed limit is enforced when traveling through the pit lane.
Furthermore, the service conducted on the car might also increase this time loss.Race strategy is therefore defined as balancing the benefits and costs of pit stops.
As of today, race simulations are applied in order to estimate the best possible race strategy beforehand, which reduces the required race time to a minimum.
These simulations greatly vary in granularity in prior literature and effects of probabilistic nature have to be considered.
Also, manual input of desired inlaps has to be made for each participant.Such a simulation is implemented in this work and further adapted to the regulations of the NLS race series.
The simulation is integrated with OpenAi’s Gym framework, to serve as an environment for reinforcement learning agents to train in.
In order to automate the race simulation, an agent is implemented with the TensorFlow framework and the training is stabilized through experience replay.
Different hyper-parameter configurations, as well as observation-spaces and reward functions are evaluated.It was found, that the agent made reasonable decisions regarding pit stop timing and refuel amount.
The learning rate and amount of episodes proved to be the most important parameters and using tire degradation in conjunction with the
current race position was found to be most fitting for policy development.Keywords: race simulation, race strategy, Reinforcement LearningBuildpython -m build
twine upload dist/\*
Package: gym-racer
gym-racerOpenAI gym environment of a racing car.Action spaceThe action space is a combination of two discrete action spaces:1) accelerate:  NOOP[0], UP[1], DOWN[2]
2) steer:  NOOP[0], LEFT[1], RIGHT[2]RewardThe reward is mainly related to the direction along the street, then multiplied by the speed of the car squared.Observation spaceThere are two types of observation possible:lidarwith shape(n): a lidar with n rays, each element indicates the first sensor out of the roaddiamondwith shape(n, n): a square of sensors, with a corner on the carThe observation type can be set by passing it in the call togym.make, and the default parameters can be overridden by passing asensor_array_paramsdict:sat="lidar"# default#  sat = "diamond"racer_env=gym.make("racer-v0",sensor_array_type=sat,sensor_array_params=sensor_array_params,)The default parameters for thelidarare:sensor_array_params["ray_num"]=7# number of rays per sidesensor_array_params["ray_step"]=15# distance between sensors along a raysensor_array_params["ray_sensors_per_ray"]=20# number of sensors along a raysensor_array_params["ray_max_angle"]=70# angle to sweep left/rightThe default parameters for thediamondare:sensor_array_params["viewfield_size"]=20# number of rows/columns in the sensorsensor_array_params["viewfield_step"]=10# spacing between the dotsRender modesThere are two types of render mode available,
thehumanmode initializespygameand renders what the car is doing to the screen,
while inconsolemode only the bare minimum of thepygameenvironment is loaded (to usespritecollide).
An environment inconsolemode cannot be rendered ashuman.The render mode can be set by passing it in the call togym.make:mode="human"# default#  mode = "console"racer_env=gym.make("racer-v0",render_mode=mode,)InfoInfo is a dict with some car details:keys=["car_pos_x","car_pos_y","car_dir","car_speed"]
Package: gym-rat-runner
Gym-Rat-RunnerIntroductionGym Rat Runneris an open-source environment implemented overOpenAI Gym.It is a 2-D discrete environment intended for Reinforcement learning applications with collision treatments. For now, the package has two distinct environments; the open and the maze environments.AgentThe agent is represented by a friendly rat with the objective of catching the cheese. Which will have eight move action options.TargetThe cheese won't move and will always be visible to the Agent.HunterThe Hunter is represented by a cat and will move differently depending on the environment.InstallationRequirementspandas >= 1.4.1
numpy >= 1.20.3
gym >= 0.23.0
pygame >= 2.1.2
opencv-pythonpipTo install the package into your machine you can use the code bellowpip install gym-rat-runnerEnvironmentsOpen EnvironmentThe open environment has 10 by 10 spaces and the cat is sleeping and won't move independently what the rat does.Maze EnvironmentThe maze environment has 16 by 32 spaces based on theBank Heistfrom Atari. Like the police in Bank Heist, the hunter won't be able to move back but it will have two options of movement:The Agent is outside the field vision of the  hunterThe cat will move randomly by the maze.The agent is inside the field vision of the hunter.The cat will start to run after the rat and will move twice the movement of the agent.
Package: gym-record
gym_recorderA recorder for open ai gym.you can easily add a text on the frame like this.installpip install gym_recordusageimportgymfromgym_recorderimportRecordersrc_env=gym.make("CartPole-v1")env=Recorder(src_env,episode_num=10)forepinrange(10):obs=env.reset()done=Falsewhilenotdone:action=env.action_space.sample()n_obs,reward,done,info=env.step(action)env.txtqueue.append(f"episode:{ep}")env.txtqueue.append(f"obs:{obs}")env.txtqueue.append(f"action:{action}")env.txtqueue.append(f"reward:{reward}")env.txtqueue.append(f"next obs:{n_obs}")tipsthis library depends on opencv-python. so you may need some library to use opencv. this is .Dockerfile example to resolve it.RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y libgl1-mesa-devif you use docker, you have to set "SDL_VIDEODRIVER" to "dummy".add this to your .DockerfileENV SDL_VIDEODRIVER=dummyor simply add this to your script.import os
os.environ["SDL_VIDEODRIVER"] = "dummy"
Package: gym-recorder
Transition Recorder Wrapper for Gym EnvironmentsA simple and ubiquitous transition recorder wrapper for Gym Environments to facilitate offline Reinforcement Learning (RL) dataset manufacturing. Transitions (observations, actions, rewards, dones & infos) and episodes (set of transitions) are buffered with LZ4 compression and each episode is saved as a JSON line (.jsonl). Output files may be further processed to be compatible with offline RL libraries likeRay RLlib(see Usage).RequirementsPython >= 3.6Pypi packages:pip install -r requirements.txtUsageSimply import & wrap your Gym environment:importgymfromgym_recorderimportTransitionRecorderWrapper# import the wrapperenv=gym.make("CartPole-v1")env=TransitionRecorderWrapper(env)# wrap your environmentenv.reset()# Use your environment as you wouldwhileTrue:env.render()action=env.action_space.sample()obs,reward,done,info=env.step(action)ifdone:env.reset()You may also use thesave_folderoption to customize where the transitions are saved,min_transitions_per_fileto customize the output file size, and disable compression with thecompressoption.ConversionThe generated.jsonlfiles may be further processed to be used by offline RL libraries likeRay RLlib. To convert a.jsonldataset generated by the wrapper to aRLlib offline datasetyou may run the following command:python -m gym_recorder.converters.ray -i data/raw -o data/rayMore options can be found withpython -m gym_recorder.converters.ray --help.
Package: gym-retro
Status:Maintenance (expect bug fixes and minor updates)Gym RetroGym Retro lets you turn classic video games intoGymenvironments for reinforcement learning and comes with integrations for ~1000 games.  It uses various emulators that support theLibretro API, making it fairly easy to add new emulators.Supported platforms:Windows 7, 8, 10macOS 10.13 (High Sierra), 10.14 (Mojave)Linux (manylinux1)Supported Pythons:3.63.73.8Each game integration has files listing memory locations for in-game variables, reward functions based on those variables, episode end conditions, savestates at the beginning of levels and a file containing hashes of ROMs that work with these files.Please note that ROMs are not included and you must obtain them yourself.  Most ROM hashes are sourced from their respective No-Intro SHA-1 sums.DocumentationDocumentation is available athttps://retro.readthedocs.io/en/latest/You should probably start with theGetting Started Guide.ContributingSee CONTRIBUTING.mdChangelogSee CHANGES.mdEmulated SystemsAtariAtari2600 (via Stella)NECTurboGrafx-16/PC Engine (via Mednafen/Beetle PCE Fast)NintendoGame Boy/Game Boy Color (via gambatte)Game Boy Advance (via mGBA)Nintendo Entertainment System (via FCEUmm)Super Nintendo Entertainment System (via Snes9x)SegaGameGear (via Genesis Plus GX)Genesis/Mega Drive (via Genesis Plus GX)Master System (via Genesis Plus GX)SeeLICENSES.mdfor information on the licenses of the individual cores.Included ROMsThe following non-commercial ROMs are included with Gym Retro for testing purposes:the 128 sine-dotby AnthroxSega Tweenby Ben RyvesHappy 10!by Blind IO512-Colour Test Demoby Chris CovellDekadriveby DekadenceAutomatonby Derek LedbetterFireby doxFamiCON introby dr88Airstrikerby ElectrokinesisLost Marblesby VantageCitationPlease cite using the following BibTeX entry:@article{nichol2018retro,
  title={Gotta Learn Fast: A New Benchmark for Generalization in RL},
  author={Nichol, Alex and Pfau, Vicki and Hesse, Christopher and Klimov, Oleg and Schulman, John},
  journal={arXiv preprint arXiv:1804.03720},
  year={2018}
}
Package: gym-robotics
Gym-RoboticsDetails and documentation on these robotics environments are available in OpenAI'sblog postand the accompanyingtechnical report.Requirements:Python 3.7 to 3.10Gym v0.26NumPy 1.18+Mujoco 2.2.2If you use these environments, please cite the following paper:@misc{1802.09464,Author={Matthias Plappert and Marcin Andrychowicz and Alex Ray and Bob McGrew and Bowen Baker and Glenn Powell and Jonas Schneider and Josh Tobin and Maciek Chociej and Peter Welinder and Vikash Kumar and Wojciech Zaremba},Title={Multi-Goal Reinforcement Learning: Challenging Robotics Environments and Request for Research},Year={2018},Eprint={arXiv:1802.09464},}New MuJoCo Python BindingsThe latest version and future versions of the MuJoCo environments will no longer depend onmujoco-py. Instead the newmujocopython bindings will be the required dependency for future gym MuJoCo environment versions. Old gym MuJoCo environment versions that depend onmujoco-pywill still be kept but unmaintained.
Dependencies for old MuJoCo environments can still be installed bypip install gym_robotics[mujoco_py].
Package: gym-sapientino
gym-sapientinoOpenAI Gym Sapientino environment using Pygame.DescriptionThe environment is inspired by a game for kids calledSapientino.A robot moves on a gridworld-like environment,
where each cell can be coloured.
When a robot is on a coloured cell, it can
run abeep, meaning it has visited the cell.The environment is compliant with theOpenAI GymAPIs.
The idea is that the designer of the experiment
should implement the actual reward by wrapping the environment.DependenciesThe environment is implemented using Pygame.On Ubuntu, you need the following libraries:sudo apt-get install python3-dev \
    libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev \
    libsdl1.2-dev  libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev libfreetype6-devOn MacOS (not tested):brew install sdl sdl_ttf sdl_image sdl_mixer portmidi  # brew or use equivalent means
conda install -c https://conda.binstar.org/quasiben pygame  # using AnacondaInstallInstall withpip:pip install gym_sapientinoOr, install from source:git clone https://github.com/whitemech/gym-sapientino.git
cd gym-sapientino
pip install .Developmentclone the repo:gitclonehttps://github.com/whitemech/gym-sapientino.gitcdgym-sapientinoCreate/activate the virtual environment:poetryshell--python=python3.7Install development dependencies:poetryinstallTestsTo run tests:toxTo run only the code tests:tox -e py3.7To run only the linters:tox -e flake8tox -e mypytox -e black-checktox -e isort-checkPlease look at thetox.inifile for the full list of supported commands.DocsTo build the docs:mkdocs buildTo view documentation in a browser:mkdocs serveand then go tohttp://localhost:8000Licensegym-sapientino is released under the GNU General Public License v3.0 or later (GPLv3+).Copyright 2019-2020 Marco Favorito, Luca IocchiAuthorsLuca IocchiMarco FavoritoCreditsThe code is largely inspired byRLGamesIf you want to use this environment in your research, please consider
citing this conference paper:@inproceedings{Giacomo2019FoundationsFR,
  title={Foundations for Restraining Bolts: Reinforcement Learning with LTLf/LDLf Restraining Specifications},
  author={Giuseppe De Giacomo and L. Iocchi and Marco Favorito and F. Patrizi},
  booktitle={ICAPS},
  year={2019}
}