semvec/pypi-packages huggingface dataset:
rocket-landing-gym 0.0.7
OpenAI Gym for vertical rocket landing. Features full 2D physics engine and works like any other gym.
Requires Python: >=3.7

# Rocket Landing Gym

Open AI Gym for vertical rocket landing containing an extensive tool to incorporate curriculum learning for your agents.

## Installation

```
pip install rocket-landing-gym
```

## Minimal usage

```python
from rocketgym.environment import Environment
import random

env = Environment()
observation = env.reset()
done = False

while not done:
    observation, reward, done = env.step(random.randint(0, 3))
    env.render()
```

## Environment

### Rocket

Rocket is treated as a 2D free body. Its physics properties have been modeled after Falcon 9. By default rocket is spawned

### State space

1. Angle made with y-axis ($rad$): [$-\frac{\pi}{2},\frac{\pi}{2}$]
2. Position Y ($m$): $[0,\infty]$
3. Velocity X ($\frac{m}{s}$): $[-\infty,\infty]$
4. Velocity Y ($\frac{m}{s}$): $[-\infty,\infty]$
5. Angular velocity ($\frac{rad}{s}$): $[-\infty,\infty]$

### Action space

At each timestep, rocket can perform one of the four actions:

1. Left - rotate the engine to the left and set maximum thrust
2. Mid - rotate the engine to the middle and set maximum thrust
3. Right - rotate the engine to the right and set maximum thrust
4. None - turn off thrust

### Reward

Reward function takes multiple components into consideration:

1. For each second, agent looses $0.3$.
2. For impact with the ground, agent receives $15$.
3. At impact, agent looses $0.5$ for each $rad$ off the vertical axis.
4. At impact, agent looses $0.25$ for each $\frac{rad}{s}$ of angular velocity
5. At impact, agent looses $1$ for each $\frac{m}{s}$ away from $-1\frac{m}{s}$ vertical velocity
6. At impact, agent looses $0.25$ for each $\frac{m}{s}$ of horizontal velocity

## Curriculum Learning

The best part about this gym. It allows you to alter the difficulty of the environment by changing things like initial height, action space etc.

### Spawn height

```python
from rocketgym.environment import Environment

env = Environment()
env.curriculum.set_fixed_height()
env.curriculum.set_random_height(1,5)

env.curriculum.enable_random_height()
env.curriculum.disable_random_height()

env.curriculum.enable_increasing_height(rate=0.05)
env.curriculum.disable_increasing_height()
```

### Spawn orientation

```python
env.curriculum.enable_random_starting_rotation()
env.curriculum.disable_random_starting_rotation()
```

### Altering the reward function

```pytohn
env.curriculum.enable_x_velocity_reward()
env.curriculum.disable_x_velocity_reward()
```
crazyimports 0.2.1
Treat your data as your code
Requires Python: >=3.7

# Crazy Imports - treat your data as your code

[![CI/CD](https://github.com/mishankov/crazy-imports/workflows/CI/CD/badge.svg)](https://github.com/mishankov/crazy-imports/actions?query=workflow:CI/CD)
[![Code style: black](https://img.shields.io/badge/code%20style-black-black)](https://github.com/mishankov/crazy-imports/actions?query=workflow:CI/CD)
[![CodeFactor](https://www.codefactor.io/repository/github/mishankov/crazy-imports/badge)](https://www.codefactor.io/repository/github/mishankov/crazy-imports)
[![codecov](https://codecov.io/gh/mishankov/crazy-imports/branch/main/graph/badge.svg?token=60BHUE496H)](https://codecov.io/gh/mishankov/crazy-imports)
[![PyPI](https://img.shields.io/pypi/v/crazyimports)](https://pypi.org/project/crazyimports/)
[![Downloads](https://pepy.tech/badge/crazyimports)](https://pepy.tech/project/crazyimports)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/crazyimports)
![PyPI - Implementation](https://img.shields.io/pypi/implementation/crazyimports)
[![PyPI - License](https://img.shields.io/pypi/l/crazyimports)](https://github.com/mishankov/crazy-imports/blob/main/LICENSE)

`crazyimports` module allows you to use your data files as if it was python modules

- [Documentation](https://mishankov.github.io/crazy-imports/)
- [GitHub repo](https://github.com/mishankov/crazy-imports)

## Simple example

Install `crazyimports` module

`pip install -U crazyimports`

Create `example.json` file with this content

```json
{"number": 42}
```

 Than in the same directory create `test.py` file

```python
import crazyimports
import example

print(example.number)
```

Then when you run `python test.py` you would see `42` output in your command line

You can find more examples in examples section of [documentation](https://mishankov.github.io/crazy-imports/)

## Supported file extensions

- `.json` for JSON files
- `.sqlite3` and `.sqlite` for SQLite3 database files
- `.csv` for CSV (Comma Separated Values) files
- `.yaml` and `.yml` for YAML files
- `.pickle` for pickle files
- `.toml` for toml files

## Credits

Heavily inspired by [this talk](https://youtu.be/CWZVNgStgbI) by [@bobuk](https://github.com/bobuk)