Conversation
…ling + random, non-optimal pass sampling in pass gen
…into sauravbanna/test_pass_data_collection
…into sauravbanna/test_pass_data_collection
Andrewyx
left a comment
There was a problem hiding this comment.
left some small nits, looks good so far!
| // | ||
| // Created by thunderbots on 2/9/26. | ||
| // |
| double min_interception_distance = | ||
| std::max(0.0, enemy_interception_vector.length() - ROBOT_MAX_RADIUS_METERS); | ||
|
|
||
| const double ENEMY_ROBOT_INTERCEPTION_SPEED_METERS_PER_SECOND = 0.5; |
There was a problem hiding this comment.
How was this speed determined & if the intention was that this value should be tuned, we should add a TODO here to track. Otherwise, we should move this constant elsewhere.
There was a problem hiding this comment.
it was used in the old cost function code, i can move it to a constants file
| min_interception_distance, ENEMY_ROBOT_MAX_SPEED_METERS_PER_SECOND, | ||
| ENEMY_ROBOT_MAX_ACCELERATION_METERS_PER_SECOND_SQUARED, | ||
| signed_1d_enemy_vel, ENEMY_ROBOT_INTERCEPTION_SPEED_METERS_PER_SECOND) | ||
| .toSeconds(); |
There was a problem hiding this comment.
Caller should perform conversion. As a wrapper around getTimeToTravelDistance, this function should share a similar return signature type.
| 0.0, 1.0); | ||
| } | ||
|
|
||
| const Robot* getClosestReceiverToPass(const Team& friendly_team, const Pass& pass) |
There was a problem hiding this comment.
Is there any reason we are using raw pointers here? e.g.const Robot*
| double ratePassFriendlyCapability(const Team& friendly_team, const Pass& pass, | ||
| const TbotsProto::PassingConfig& passing_config); | ||
|
|
||
| Rectangle getReducedField(const Field& field, TbotsProto::PassingConfig passing_config); |
| score += BAD_SCORE; | ||
|
|
||
| // how well the receiver can receive the ball | ||
| auto friendlyReceiveCapabilitySigmoid = |
| // how well any enemy can intercept the ball | ||
| for (const auto& robot : world.enemyTeam().getAllRobots()) | ||
| { | ||
| auto intercept_time_delta = |
| } | ||
|
|
||
| num_passes_since_sample_ = | ||
| (num_passes_since_sample_ + 1) % PASS_SAMPLING_FREQUENCY; |
There was a problem hiding this comment.
num_passes_since_sample_++
| { | ||
| if (num_picks_since_random_ == 0) | ||
| { | ||
| std::uniform_int_distribution<std::size_t> distribution( |
There was a problem hiding this comment.
the main overhead seems to be the std::mt19937 random_num_gen_; initialization, which is only done once. the uniform_int_distribution has to be initialized every time since the size of the considered passes list changes, but doesn't seem to be a huge overhead.
| unsigned int num_passes_since_sample_ = 0; | ||
| unsigned int num_picks_since_random_ = 0; | ||
| bool sample_pass_features_ = false; |
Description
Added a class which logs Pass Features -> features we'd like to use for training weights for judging passes in the future
I put the new class in the
passingdirectory since it made senseTesting Done
Compiles + logs at the correct rate based on boolean flag. next pr will consume the protos generated
Resolved Issues
Length Justification and Key Files to Review
Review Checklist
It is the reviewers responsibility to also make sure every item here has been covered
.hfile) should have a javadoc style comment at the start of them. For examples, see the functions defined inthunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.TODO(or similar) statements should either be completed or associated with a github issue