mirror of
https://github.com/jcreek/Sarpy.git
synced 2026-07-12 18:53:44 +00:00
feat(*): Final commit for Sarpy V1 trained in the actual game
This commit is contained in:
@@ -98,6 +98,34 @@ However, I noticed that there's a lot of dead time, where it's not necessarily d
|
||||
- LiuDistanceBallToGoalReward -> 20
|
||||
- RewardIfClosestToBall -> 10
|
||||
|
||||
#### ~1.5 billion steps
|
||||
|
||||
The bot can hold its own against the Psyonix Rookie bot, but only just beats it. Its fundamental weakness seems to be that it ignores actually scoring goals in favour of doing other things. On inspection, the scaling for rewards for goals is well behind everything else, so the rewards are changed as below:
|
||||
|
||||
- EventReward -> 1000
|
||||
- team_goal -> 10000
|
||||
- concede -> -10000
|
||||
- shot -> 10
|
||||
- save -> 60
|
||||
- demo -> 20
|
||||
|
||||
#### ~1.75 billion steps
|
||||
|
||||
The bot is now worse, mostly just sitting around in the middle of the pitch and moving very slowly. Given it has learned basic mechanics, I'm trying totally changing the rewards at this point, so the new rewards are as below, and are all equally weighted:
|
||||
|
||||
- VelocityPlayerToBallReward
|
||||
- VelocityBallToGoalReward
|
||||
- EventReward
|
||||
- team_goal=1000.0
|
||||
- concede=-100.0
|
||||
- shot=10.0
|
||||
- save=60.0
|
||||
- demo=20.0
|
||||
- KickoffReward
|
||||
- SaveBoostReward
|
||||
|
||||
My hope is that this encourages the bot to move faster, pick up more boost, and prioritise hitting the ball quickly towards the enemy goal.
|
||||
|
||||
### Stage 2
|
||||
|
||||
Learn the strategies for playing each game mode. To do this I will make the bot train in each game mode in series, or possibly in parallel if I can configure it to run different game modes in different instances of Rocket League.
|
||||
|
||||
Binary file not shown.
+11
-94
@@ -1,108 +1,25 @@
|
||||
absl-py==2.0.0
|
||||
ale-py==0.7.4
|
||||
attrs==23.1.0
|
||||
AutoROM==0.6.1
|
||||
AutoROM.accept-rom-license==0.6.1
|
||||
box2d-py==2.3.5
|
||||
cachetools==5.3.1
|
||||
certifi==2023.7.22
|
||||
cffi==1.15.1
|
||||
charset-normalizer==3.2.0
|
||||
click==8.1.7
|
||||
cloudpickle==2.2.1
|
||||
colorama==0.4.6
|
||||
comtypes==1.2.0
|
||||
contourpy==1.1.1
|
||||
cycler==0.11.0
|
||||
dataclasses==0.6
|
||||
docopt==0.6.2
|
||||
exceptiongroup==1.1.3
|
||||
Farama-Notifications==0.0.4
|
||||
filelock==3.9.0
|
||||
flatbuffers==1.12
|
||||
fonttools==4.42.1
|
||||
google-auth==2.23.0
|
||||
charset-normalizer==3.3.0
|
||||
google-auth==2.23.3
|
||||
google-auth-oauthlib==1.0.0
|
||||
grpcio==1.58.0
|
||||
gym==0.21.0
|
||||
gym-notices==0.0.8
|
||||
gymnasium==0.29.1
|
||||
h11==0.14.0
|
||||
grpcio==1.59.0
|
||||
idna==3.4
|
||||
importlib-metadata==4.13.0
|
||||
importlib-resources==6.1.0
|
||||
inputs==0.5
|
||||
Jinja2==3.1.2
|
||||
kiwisolver==1.4.5
|
||||
llvmlite==0.38.1
|
||||
Markdown==3.4.4
|
||||
markdown-it-py==3.0.0
|
||||
MarkupSafe==2.1.2
|
||||
matplotlib==3.8.0
|
||||
mdurl==0.1.2
|
||||
mpmath==1.3.0
|
||||
networkx==3.0
|
||||
numba==0.55.1
|
||||
numpy==1.26.0
|
||||
importlib-metadata==6.8.0
|
||||
Markdown==3.5
|
||||
MarkupSafe==2.1.3
|
||||
numpy==1.26.1
|
||||
oauthlib==3.2.2
|
||||
opencv-python==4.8.0.76
|
||||
outcome==1.2.0
|
||||
packaging==23.1
|
||||
pandas==2.1.1
|
||||
Pillow==9.3.0
|
||||
protobuf==4.24.3
|
||||
psutil==5.8.0
|
||||
protobuf==4.24.4
|
||||
pyasn1==0.5.0
|
||||
pyasn1-modules==0.3.0
|
||||
pycparser==2.21
|
||||
pygame==2.1.0
|
||||
pyglet==2.0.9
|
||||
Pygments==2.16.1
|
||||
pyparsing==3.1.1
|
||||
PyQt5==5.15.9
|
||||
PyQt5-Qt5==5.15.2
|
||||
PyQt5-sip==12.12.2
|
||||
PySocks==1.7.1
|
||||
python-dateutil==2.8.2
|
||||
python-dotenv==1.0.0
|
||||
pytz==2023.3.post1
|
||||
pywin32==228
|
||||
pywinauto==0.6.8
|
||||
requests==2.31.0
|
||||
requests-oauthlib==1.3.1
|
||||
requirements-parser==0.5.0
|
||||
rich==13.5.3
|
||||
rlbot==1.67.4
|
||||
rlbot-gui==0.0.154
|
||||
rlbottraining==0.6.1
|
||||
rlgym==1.2.2
|
||||
rlgym-tools==1.8.2
|
||||
RLUtilities==0.0.13
|
||||
rsa==4.9
|
||||
scipy==1.11.2
|
||||
selenium==4.12.0
|
||||
Shimmy==1.1.0
|
||||
six==1.16.0
|
||||
sniffio==1.3.0
|
||||
sortedcontainers==2.4.0
|
||||
stable-baselines3==1.8.0
|
||||
swig==4.1.1
|
||||
sympy==1.12
|
||||
tensorboard==2.14.0
|
||||
tensorboard==2.14.1
|
||||
tensorboard-data-server==0.7.1
|
||||
torch==2.0.1+cu117
|
||||
torchaudio==2.0.2+cu117
|
||||
torchvision==0.15.2+cu117
|
||||
tqdm==4.66.1
|
||||
trio==0.22.2
|
||||
trio-websocket==0.10.4
|
||||
types-setuptools==68.2.0.0
|
||||
typing-extensions==4.4.0
|
||||
tzdata==2023.3
|
||||
urllib3==1.26.16
|
||||
watchdog==3.0.0
|
||||
webdriver-manager==4.0.0
|
||||
websockets==11.0.3
|
||||
werkzeug==2.3.7
|
||||
wsproto==1.2.0
|
||||
urllib3==2.0.6
|
||||
werkzeug==3.0.0
|
||||
zipp==3.17.0
|
||||
|
||||
+31
-14
@@ -20,6 +20,7 @@ from rlgym.utils.reward_functions.common_rewards import (
|
||||
FaceBallReward,
|
||||
TouchBallReward,
|
||||
AlignBallGoal,
|
||||
SaveBoostReward,
|
||||
)
|
||||
from rlgym.utils.obs_builders import AdvancedObs
|
||||
from rlgym.utils.state_setters import DefaultState
|
||||
@@ -71,24 +72,40 @@ if __name__ == "__main__": # Required for multiprocessing
|
||||
(
|
||||
VelocityPlayerToBallReward(),
|
||||
VelocityBallToGoalReward(),
|
||||
LiuDistanceBallToGoalReward(),
|
||||
EventReward(
|
||||
team_goal=100.0,
|
||||
team_goal=1000.0,
|
||||
concede=-100.0,
|
||||
shot=5.0,
|
||||
save=30.0,
|
||||
demo=10.0,
|
||||
shot=10.0,
|
||||
save=60.0,
|
||||
demo=20.0,
|
||||
),
|
||||
BallYCoordinateReward(),
|
||||
RewardIfClosestToBall(LiuDistancePlayerToBallReward()),
|
||||
LiuDistancePlayerToBallReward(),
|
||||
FaceBallReward(),
|
||||
TouchBallReward(),
|
||||
AlignBallGoal(),
|
||||
KickoffReward(),
|
||||
SaveBoostReward(),
|
||||
),
|
||||
(50.0, 10.0, 20.0, 10.0, 0.1, 10.0, 1.0, 0.2, 10.0, 20.0, 10.0),
|
||||
(1.0, 1.0, 1.0, 1.0, 1.0),
|
||||
),
|
||||
# reward_function=CombinedReward(
|
||||
# (
|
||||
# VelocityPlayerToBallReward(),
|
||||
# VelocityBallToGoalReward(),
|
||||
# LiuDistanceBallToGoalReward(),
|
||||
# EventReward(
|
||||
# team_goal=10000.0,
|
||||
# concede=-10000.0,
|
||||
# shot=10.0,
|
||||
# save=60.0,
|
||||
# demo=20.0,
|
||||
# ),
|
||||
# BallYCoordinateReward(),
|
||||
# RewardIfClosestToBall(LiuDistancePlayerToBallReward()),
|
||||
# LiuDistancePlayerToBallReward(),
|
||||
# FaceBallReward(),
|
||||
# TouchBallReward(),
|
||||
# AlignBallGoal(),
|
||||
# KickoffReward(),
|
||||
# ),
|
||||
# (50.0, 10.0, 20.0, 100.0, 0.1, 10.0, 1.0, 0.2, 10.0, 20.0, 10.0),
|
||||
# ),
|
||||
spawn_opponents=True,
|
||||
terminal_conditions=[
|
||||
TimeoutCondition(fps * 300),
|
||||
@@ -104,8 +121,8 @@ if __name__ == "__main__": # Required for multiprocessing
|
||||
|
||||
# Generate the environment (the Rocket League game used by RL Gym)
|
||||
env = SB3MultipleInstanceEnv(
|
||||
get_match, 10
|
||||
) # Start 10 instances, waiting 60 seconds between each
|
||||
get_match, 14
|
||||
) # Start 14 instances, waiting 30 seconds between each
|
||||
env = VecCheckNan(env) # Optional
|
||||
env = VecMonitor(env) # Recommended, logs mean reward and ep_len to Tensorboard
|
||||
env = VecNormalize(
|
||||
|
||||
Reference in New Issue
Block a user