Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump to 0.10.0 #552

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9d3605d
step by step
jet-sony Aug 1, 2024
78ad5b4
stash, gotta get back to work
jet-sony Aug 1, 2024
5ae27d9
remove discrete implementation and use only continuous
jjshoots Aug 3, 2024
b2af342
split the thresholds
jjshoots Aug 3, 2024
229f1ed
add thresholds
jjshoots Aug 3, 2024
0355c91
use true-to-game actions
jjshoots Aug 3, 2024
0bc1ea3
I think... I'm happy with this interface for now
jjshoots Aug 3, 2024
998e3e3
amend stella env
jjshoots Aug 3, 2024
c3a9164
remove redundant params
jjshoots Aug 3, 2024
f25a114
make default parameter
jjshoots Aug 3, 2024
10903c5
amend interface to have default parameter at top level
jjshoots Aug 3, 2024
84ca055
swap parameter order and implement continuous for wrappers
jjshoots Aug 3, 2024
9aef3d7
maybe stella shouldn't use default params
jjshoots Aug 3, 2024
3a971e8
move discretization to Python
jjshoots Aug 3, 2024
cef5892
fix some bugs
jjshoots Aug 3, 2024
b9ac273
fix another bug
jjshoots Aug 3, 2024
4189fb8
stash
jjshoots Aug 3, 2024
9dfe314
stash
jjshoots Aug 3, 2024
3c9c8aa
fix some more bugs
jjshoots Aug 3, 2024
86722e9
ALWAYS the rogue curlies you gotta watch out for
jjshoots Aug 3, 2024
fae19c1
streamline
jjshoots Aug 3, 2024
2e3d879
fixing tests
jjshoots Aug 3, 2024
d7f37b7
make int
jjshoots Aug 3, 2024
ea133ae
fix argument
jjshoots Aug 3, 2024
444dde3
passing tests
jjshoots Aug 3, 2024
2d86927
fix bug
jjshoots Aug 3, 2024
b58e9b2
use full action space in continuous mode
jjshoots Aug 3, 2024
a5df888
precommit
jjshoots Aug 3, 2024
ea2303f
fix bug
jjshoots Aug 3, 2024
394c515
additional warning
jjshoots Aug 3, 2024
be3e869
precommit
jjshoots Aug 3, 2024
c38033e
update interface signature
jjshoots Aug 4, 2024
140f95e
change to default emulate strength 1.0
jjshoots Aug 6, 2024
d46de36
perform a version bump
jjshoots Aug 10, 2024
fab7071
Merge remote-tracking branch 'farama/CALE' into jet/version_bump_CALE
jjshoots Aug 10, 2024
edfa24f
0.11
jjshoots Aug 10, 2024
479d342
add changelog
jjshoots Aug 10, 2024
8942b5f
less verbose changelog
jjshoots Aug 10, 2024
9a8c8db
update change log and use 0.10.0
jjshoots Aug 12, 2024
9cc9f72
Update ci.yml
pseudo-rnd-thoughts Aug 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ jobs:

- name: Build
# wildcarding doesn't work for some reason, therefore, update the project version here
run: python -m pip install wheels/ale_py-0.9.1-${{ matrix.wheel-name }}.whl
run: python -m pip install wheels/ale_py-0.10.0-${{ matrix.wheel-name }}.whl

- name: Install Gymnasium and pytest
run: python -m pip install gymnasium>=1.0.0a2 pytest
Expand Down
65 changes: 65 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,71 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.10.0 -

Previously in the original ALE interface, the actions are only joystick ActionEnum inputs.
Then, for games that use a paddle instead of a joystick, joystick controls are mapped into discrete actions applied to paddles, ie:
- All left actions (`LEFTDOWN`, `LEFTUP`, `LEFT...`) -> paddle left max
- All right actions (`RIGHTDOWN`, `RIGHTUP`, `RIGHT...`) -> paddle right max
- Up... etc.
- Down... etc.

This results in loss of continuous action for paddles.
This change keeps this functionality and interface, but allows for continuous action inputs for games that allow paddle usage.

To do that, the CPP interface has been modified.

_Old Discrete ALE interface_
```cpp
reward_t ALEInterface::act(Action action)
```

_New Mixed Discrete-Continuous ALE interface_
```cpp
reward_t ALEInterface::act(Action action, float paddle_strength = 1.0)
```

Games where the paddle is not used simply have the `paddle_strength` parameter ignored.
This mirrors the real world scenario where you have a paddle connected, but the game doesn't react to it when the paddle is turned.
This maintains backwards compatibility.

The Python interface has also been updated.

_Old Discrete ALE Python Interface_
```py
ale.act(action: int)
```

_New Mixed Discrete-Continuous ALE Python Interface_
```py
ale.act(action: int, strength: float = 1.0)
```

More specifically, when continuous action space is used within an ALE gymnasium environment, discretization happens at the Python level.
```py
if continuous:
# action is expected to be a [2,] array of floats
x, y = action[0] * np.cos(action[1]), action[0] * np.sin(action[1])
action_idx = self.map_action_idx(
left_center_right=(
-int(x < self.continuous_action_threshold)
+ int(x > self.continuous_action_threshold)
),
down_center_up=(
-int(y < self.continuous_action_threshold)
+ int(y > self.continuous_action_threshold)
),
fire=(action[-1] > self.continuous_action_threshold),
)
ale.act(action_idx, action[1])
```

More specifically, [`self.map_action_idx`](https://github.com/Farama-Foundation/Arcade-Learning-Environment/pull/550/files#diff-057906329e72d689f1d4d9d9e3f80df11ffe74da581b29b3838a436e90841b5cR388-R447) is an `lru_cache`-ed function that takes the continuous action direction and maps it into an ActionEnum.

## 0.9.1 -

Added support for Numpy 2.0.

## [0.9.0] - 2024-05-10

Previously, ALE implemented only a [Gym](https://github.com/openai/gym) based environment, however, as Gym is no longer maintained (last commit was 18 months ago). We have updated `ale-py` to use [Gymnasium](http://github.com/farama-Foundation/gymnasium) (a maintained fork of Gym) as the sole backend environment implementation. For more information on Gymnasium’s API, see their [introduction page](https://gymnasium.farama.org/main/introduction/basic_usage/).
Expand Down
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"name": "arcade-learning-environment",
"version": "0.9.1",
"version": "0.10.0",
"dependencies": [
"zlib"
],
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.1
0.10.0
Loading