Skip to content

Commit 88a9b30

Browse files
feat(envs): rebalance poly/complex difficulties
- make the poly-normal and poly-hard tasks slightly less difficulty - give complex tasks a few more moves
1 parent 9323966 commit 88a9b30

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libraries/mathy_python/mathy/envs/complex_simplify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def get_env_namespace(self) -> str:
2626
def max_moves_fn(
2727
self, problem: MathyEnvProblem, config: MathyEnvProblemArgs
2828
) -> int:
29-
return problem.complexity * 4
29+
return problem.complexity * 5
3030

3131
def problem_fn(self, params: MathyEnvProblemArgs) -> MathyEnvProblem:
3232
"""Given a set of parameters to control term generation, produce

libraries/mathy_python/mathy/envs/poly_simplify.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def problem_fn(self, params: MathyEnvProblemArgs) -> MathyEnvProblem:
9090
# e.g. mashing the 3rd node to commute the tree until a DF shows up in
9191
# the desired position.
9292
noise_terms = randint(1, 4)
93-
num_terms = randint(6, 10)
93+
num_terms = randint(4, 8)
9494
scaling = uniform(0.5, 0.6)
9595
powers = uniform(0.35, 0.8)
9696
shuffle = uniform(0.35, 0.8)
@@ -104,8 +104,8 @@ def problem_fn(self, params: MathyEnvProblemArgs) -> MathyEnvProblem:
104104
noise_terms=noise_terms,
105105
)
106106
elif params.difficulty == MathyEnvDifficulty.hard:
107-
noise_terms = randint(1, 3)
108-
num_terms = randint(8, 20)
107+
noise_terms = randint(3, 7)
108+
num_terms = randint(6, 10)
109109
scaling = uniform(0.5, 0.5)
110110
powers = uniform(0.15, 0.8)
111111
shuffle = uniform(0.35, 0.9)

0 commit comments

Comments
 (0)