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

Update the action space of PointMaze to be [-1, 1]^2 #101

Merged
merged 2 commits into from
Nov 2, 2022

Conversation

felixchalumeau
Copy link
Collaborator

@felixchalumeau felixchalumeau commented Nov 1, 2022

Related to #37

All envs have an action space being a cartesian product of [-1, 1], except PointMaze that has [-0.1, 0.1]. This PR fixes this by moving the action space of PointMaze to [-1, 1]^2.

This has a small impact on the optimization process. Illustrated by the following plots.

Optim with MAP-Elites and the previous action space:
map-elites-ptmaze-old-action-space

Optim with MAP-Elites and the new action space:
map-elites-ptmaze-new-action-space

The slight difference in the optimization process arises because the previous implementation was feeding arbitrarily large actions (i.e. in the range of -1 and 1) where the action was then clipped to defined min max of the environment (i.e. -0.1 and 0.1). The new implementation standardizes the action space to force min max of the environment to be -1, 1 and then does the scaling to -0.1 and 0.1 internally within the environment. We can expect more similar results to the new implementation if we rescaled the outputs of the policy to -0.1 and 0.1 before passing it into the old environment implementation.

@felixchalumeau felixchalumeau changed the base branch from main to develop November 1, 2022 09:41
@felixchalumeau felixchalumeau marked this pull request as ready for review November 1, 2022 09:42
@felixchalumeau felixchalumeau self-assigned this Nov 1, 2022
@felixchalumeau felixchalumeau added this to the v0.2.0 milestone Nov 1, 2022
@codecov-commenter
Copy link

codecov-commenter commented Nov 1, 2022

Codecov Report

Merging #101 (d68a5a4) into develop (e58472e) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop     #101   +/-   ##
========================================
  Coverage    90.72%   90.72%           
========================================
  Files           82       82           
  Lines         4572     4572           
========================================
  Hits          4148     4148           
  Misses         424      424           
Impacted Files Coverage Δ
qdax/environments/pointmaze.py 95.37% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants