Skip to content

Commit 923091e

Browse files
Release 0.6.4
1 parent 913ee82 commit 923091e

File tree

4 files changed

+7
-19
lines changed

4 files changed

+7
-19
lines changed

readme/get_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ _(Instructions for TrackMania 2020)_
162162
```shell
163163
python -m tmrl --record-reward
164164
```
165-
- If you are on Windows, press `e` to start recording _(on Linux, recording starts automatically)_
165+
- Wait for the recording to start (a message will be displayed in the terminal)
166166
- Complete the track
167167
- Check that your reward and environment work correctly:
168168
- Execute:

readme/reference_guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ All parameters are described below.
122122
python -m tmrl --test
123123
```
124124

125-
- Record a reward function in TrackMania. In Windows, press `e` to start recording. In Linux, recording starts automatically. You should start recording at the beginning of the track. The script will compute the reward function automatically when you cross the finish line:
125+
- Record a reward function in TrackMania. You should start recording at the beginning of the track. The script will compute the reward function automatically when you cross the finish line:
126126
```bash
127127
python -m tmrl --record-reward
128128
```

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ def url_retrieve(url: str, outfile: Path, overwrite: bool = False):
137137

138138
setup(
139139
name='tmrl',
140-
version='0.6.3',
140+
version='0.6.4',
141141
description='Network-based framework for real-time robot learning',
142142
long_description=README,
143143
long_description_content_type='text/markdown',
144144
keywords='reinforcement learning, robot learning, trackmania, self driving, roborace',
145145
url='https://github.com/trackmania-rl/tmrl',
146-
download_url='https://github.com/trackmania-rl/tmrl/archive/refs/tags/v0.6.3.tar.gz',
146+
download_url='https://github.com/trackmania-rl/tmrl/archive/refs/tags/v0.6.4.tar.gz',
147147
author='Yann Bouteiller, Edouard Geze',
148148
149149
license='MIT',

tmrl/tools/record.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313

1414
PATH_REWARD = cfg.REWARD_PATH
1515
DATASET_PATH = cfg.DATASET_PATH
16-
SYSTEM = cfg.SYSTEM
17-
18-
if SYSTEM == "Windows":
19-
import keyboard
2016

2117

2218
def record_reward_dist(path_reward=PATH_REWARD):
@@ -27,21 +23,13 @@ def record_reward_dist(path_reward=PATH_REWARD):
2723
is_recording = False
2824
while True:
2925
if not is_recording:
30-
if SYSTEM == "Windows":
31-
if keyboard.is_pressed('e'):
32-
logging.info(f"start recording")
33-
is_recording = True
34-
else:
35-
logging.info(f"start recording")
36-
is_recording = True
26+
logging.info(f"start recording")
27+
is_recording = True
3728

3829
if is_recording:
3930
data = client.retrieve_data(sleep_if_empty=0.01) # we need many points to build a smooth curve
4031
terminated = bool(data[8])
41-
if SYSTEM == "Windows":
42-
early_stop = keyboard.is_pressed('q')
43-
else:
44-
early_stop = False
32+
early_stop = False
4533
if early_stop or terminated:
4634
logging.info(f"Computing reward function checkpoints from captured positions...")
4735
logging.info(f"Initial number of captured positions: {len(positions)}")

0 commit comments

Comments
 (0)