2022-09-13 20:27:34 +01:00
---
title: Road Runner
---
2022-12-04 22:24:02 +08:00
2022-09-13 20:27:34 +01:00
# Road Runner
2022-12-04 22:24:02 +08:00
```{figure} ../../_static/videos/atari/road_runner.gif
2022-09-13 20:27:34 +01:00
:width: 120px
:name: RoadRunner
```
This environment is part of the < a href = '..' > Atari environments< / a > . Please read that page first for general information.
2022-09-19 21:14:09 +01:00
| | |
|-------------------|---------------------------------------|
| Action Space | Discrete(18) |
| Observation Space | (210, 160, 3) |
| Observation High | 255 |
| Observation Low | 0 |
| Import | `gymnasium.make("ALE/RoadRunner-v0")` |
2022-09-13 20:27:34 +01:00
2022-10-12 15:58:01 +01:00
## Description
2022-12-04 22:24:02 +08:00
2022-09-13 20:27:34 +01:00
You control the Road Runner(TM) in a race; you can control the direction to run in and times to jumps.
2022-12-04 22:24:02 +08:00
The goal is to outrun Wile E. Coyote(TM) while avoiding the hazards of the desert.
2022-09-13 20:27:34 +01:00
The game begins with three lives. You lose a life when the coyote
catches you, picks you up in a rocket, or shoots you with a cannon. You also
lose a life when a truck hits you, you hit a land mine, you fall off a cliff,
or you get hit by a falling rock.
2022-12-04 22:24:02 +08:00
2022-09-13 20:27:34 +01:00
You score points (i.e. rewards) by eating seeds along the road, eating steel shot, and
destroying the coyote.
Detailed documentation can be found on [the AtariAge page ](https://atariage.com/manual_html_page.php?SoftwareLabelID=412 )
2022-10-12 15:58:01 +01:00
## Actions
2022-12-04 22:24:02 +08:00
2022-09-13 20:27:34 +01:00
By default, all actions that can be performed on an Atari 2600 are available in this environment.Even if you use v0 or v4 or specify `full_action_space=False` during initialization, all actions will be available in the default flavor.
2022-12-04 22:24:02 +08:00
2022-10-12 15:58:01 +01:00
## Observations
2022-12-04 22:24:02 +08:00
2022-09-13 20:27:34 +01:00
By default, the environment returns the RGB image that is displayed to human players as an observation. However, it is
possible to observe
2022-12-04 22:24:02 +08:00
2022-09-13 20:27:34 +01:00
- The 128 Bytes of RAM of the console
- A grayscale image
instead. The respective observation spaces are
2022-12-04 22:24:02 +08:00
2022-09-13 20:27:34 +01:00
- `Box([0 ... 0], [255 ... 255], (128,), uint8)`
- `Box([[0 ... 0]
...
[0 ... 0]], [[255 ... 255]
...
[255 ... 255]], (250, 160), uint8)
`
respectively. The general article on Atari environments outlines different ways to instantiate corresponding environments
via `gymnasium.make` .
### Rewards
2022-12-04 22:24:02 +08:00
2022-09-13 20:27:34 +01:00
Score points are your only reward. You get score points each time you:
2022-09-19 21:14:09 +01:00
| actions | points |
|-------------------------------------------------------|--------|
| eat a pile of birdseed | 100 |
| eat steel shot | 100 |
| get the coyote hit by a mine (cannonball, rock, etc.) | 200 |
| get the coyote hit by a truck | 1000 |
2022-09-13 20:27:34 +01:00
For a more detailed documentation, see [the AtariAge page ](https://atariage.com/manual_html_page.php?SoftwareLabelID=412 ).
2022-12-04 22:24:02 +08:00
2022-10-12 15:58:01 +01:00
## Arguments
2022-09-13 20:27:34 +01:00
2022-12-04 22:24:02 +08:00
```python
2022-09-13 20:27:34 +01:00
env = gymnasium.make("ALE/RoadRunner-v5")
```
The various ways to configure the environment are described in detail in the article on Atari environments.
2022-12-04 22:24:02 +08:00
It is possible to specify various flavors of the environment via the keyword arguments `difficulty` and `mode` .
2022-09-13 20:27:34 +01:00
A flavor is a combination of a game mode and a difficulty setting.
2022-09-19 21:14:09 +01:00
| Environment | Valid Modes | Valid Difficulties | Default Mode |
|-------------|-------------|--------------------|--------------|
| RoadRunner | `[0]` | `[0]` | `0` |
2022-09-13 20:27:34 +01:00
2022-12-04 22:24:02 +08:00
You may use the suffix "-ram" to switch to the RAM observation space. In v0 and v4, the suffixes "Deterministic" and "NoFrameskip"
are available. These are no longer supported in v5. In order to obtain equivalent behavior, pass keyword arguments to `gymnasium.make` as outlined in
2022-09-13 20:27:34 +01:00
the general article on Atari environments.
The versions v0 and v4 are not contained in the "ALE" namespace. I.e. they are instantiated via `gymnasium.make("RoadRunner-v0")` .
2022-10-12 15:58:01 +01:00
## Version History
2022-12-04 22:24:02 +08:00
2022-09-13 20:27:34 +01:00
A thorough discussion of the intricate differences between the versions and configurations can be found in the
2022-12-04 22:24:02 +08:00
general article on Atari environments.
2022-09-13 20:27:34 +01:00
* v5: Stickiness was added back and stochastic frameskipping was removed. The entire action space is used by default. The environments are now in the "ALE" namespace.
* v4: Stickiness of actions was removed
* v0: Initial versions release (1.0.0)