Skip to content

Commit

Permalink
Interaction scaling (#63)
Browse files Browse the repository at this point in the history
* Scale feature values within categorical interaction blocks.

* Scale feature values within categorical interaction blocks.

* Scale feature values within categorical interaction blocks.
  • Loading branch information
MatthewGerber authored Oct 29, 2024
1 parent 641883e commit 4010880
Show file tree
Hide file tree
Showing 20 changed files with 443 additions and 120 deletions.
9 changes: 6 additions & 3 deletions src/rlai/core/environments/gridworld.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ def extract(

return self.interact(
state_features=state_features,
actions=actions
actions=actions,
refit_scaler=refit_scaler
)

def get_action_feature_names(
Expand All @@ -325,14 +326,16 @@ def __init__(
:param environment: Environment.
"""

# don't rescale features in the superclass action-interactor. no rescaling at all in this class.
super().__init__(
environment=environment,
actions=[
environment.a_up,
environment.a_down,
environment.a_left,
environment.a_right
]
],
scale_features=False
)

self.num_rows = environment.grid.shape[0]
Expand Down Expand Up @@ -464,7 +467,7 @@ def __init__(
:param environment: Environment.
"""

super().__init__()
super().__init__(False)

self.num_rows = environment.grid.shape[0]
self.num_cols = environment.grid.shape[1]
Loading

0 comments on commit 4010880

Please sign in to comment.