Clickenv#600
Open
daphne-cornelisse wants to merge 15 commits into
Open
Conversation
jsuarez5341
reviewed
Jun 26, 2026
|
|
||
| if (!moved && !clicked) return 0; | ||
|
|
||
| env->actions[0] = move_x; |
Contributor
There was a problem hiding this comment.
Human action space should match the agent action space
| for (int i = 0; i < NUM_START_TARGETS; i++) { | ||
| env->targets[i].x = rand_r(&env->rng) % env->width; | ||
| env->targets[i].y = rand_r(&env->rng) % env->height; | ||
| env->targets[i].radius = TARGET_RADIUS_MIN + rand_r(&env->rng) % (TARGET_RADIUS_MAX - TARGET_RADIUS_MIN + 1); |
| env->agent.y = env->actions[1]; | ||
| env->agent.status = env->actions[2]; | ||
| } else { | ||
| if (env->action_type == CONTINUOUS) { |
Contributor
There was a problem hiding this comment.
Good env to use for a continuous vs. discrete ablation, but continuous isn't wired correctly in binding. There's not a clean way to do this afaik in 4.0 from a config param.
| if (env->targets[i].spawn_time == -1 && rand_r(&env->rng) % 100 < 20) { // 20% chance to spawn a new target | ||
| env->targets[i].x = rand_r(&env->rng) % env->width; | ||
| env->targets[i].y = rand_r(&env->rng) % env->height; | ||
| env->targets[i].radius = TARGET_RADIUS_MIN + rand_r(&env->rng) % (TARGET_RADIUS_MAX - TARGET_RADIUS_MIN + 1); |
Contributor
There was a problem hiding this comment.
Use the puffer in shared/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Click environment modeled after https://www.aimbooster.com/
Mouse movements override the agent's actions.
Agent receives 3 lives, each misclick subtracts one of them. The environment is reset if we reach the episode length or the agent is out of lives.