![]() |
Keeping Track of Assists
Hello everyone,
I am currently working on a web app to mimic the alliance station possession and assist monitor for practice. I am having trouble thinking of a way to keep track of assists. As I have it now, most scenarios shown in this video work as they should, however some don't. This is my current method for keeping track: Code:
if(robotNum == 'robot1' && zone == 'red' && !redZone && !rOneAssist) {Assists are a very confusing part of the game, which is one of the reasons why this is difficult for me to wrap my head around. |
Re: Keeping Track of Assists
How about this:
1) Make a list of all pairs of all robot/zone combinations 2) Make all permutations of these items that are length 3 or less 3) Remove anything that uses the same robot or the same zone more than once 4) Output the max length of anything that's left |
Re: Keeping Track of Assists
Few questions:
1) Does the list contain only the combinations since the start of the cycle, or all possible combinations(9)? 2) Could you explain how I would then permute that list? 3) How would I use the max length to determine which robot gets the assist? Thanks for your help! |
Re: Keeping Track of Assists
1 Attachment(s)
To make the method that I mentioned more concrete, here's a C++ implementation. Note that it hasn't been optimized at all and uses C++11 features.
|
Re: Keeping Track of Assists
Quote:
For example, if both robot A and robot B each hold the ball but each only holds it in the white zone who should get the credit? It doesn't matter for scoring. |
Re: Keeping Track of Assists
I know that which robot gets the assist doesn't matter, however, I am trying the simulate the alliance monitor, which does show which robot got the assist, and where.
|
Re: Keeping Track of Assists
Quote:
Since FIRST doesn't release the details to make it work exactly the same as their implementation, I would try to make it the most reasonable way and not spend too much time worrying if it matches exactly. I would re-evaluate at each possession/zone change and use whichever gives the highest score at that time. If there are multiple permutations with the same score, I would use the same combination that was used in the last evaluation. |
Would somebody be able to explain the permutation process?
Do I permutate each combination of robot/zone (r1red, r2white...) or each object (r1, red, r2, white...)? |
Re: Keeping Track of Assists
Have you tried running the code? I think that if you print out the data structures as it runs it might become more clear.
|
Re: Keeping Track of Assists
I have run the code, however I'm not exactly fluent in c++, so it is hard for me to figure out what and how to print the correct things.
|
Re: Keeping Track of Assists
1 Attachment(s)
Ok, try this.
|
| All times are GMT -5. The time now is 02:33. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi