Guest User

This devlog will log 5h 44m of work.

a guest
Mar 8th, 2026
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.44 KB | None | 0 0
  1. oh boy this took a while
  2. so basically i'm done with robotics itself, end of season
  3. so what i wanna do now is work on a FULL EVENT PREDICTION FRAMEWORK
  4. breaking this problem up, we need to:
  5. 1. take the real schedule/generate random schedules for each simulation, and run monte carlo simulations on each and every match to determine a final qualification rankings list
  6. 2. take that rankings list, assign then to alliances based on historical trends/certain observed theoretically optimal scoring features/strategies
  7. 3. run our goat monte carlo simulations on said alliance list in the FTC standard double elimination bracket
  8. 4. determine final playoff standings
  9. and 5. throw in the advancement points given by awards.
  10.  
  11. sounds like a lot right? fuh yeah it is
  12. i chose to start with #5 because it is the most unknown factor and would benefit the most from historically modeled insights.
  13.  
  14. so basically what I did was train a custom torch model (on my i3-1215u CPU btw) to take a bunch of historical data on a set of teams, and award these teams the standard FTC awards.
  15.  
  16. 1. scrape all the data
  17. a. scrape all awards a team has ever won, from 2019-mid2025 season inclusive
  18. b. scrape all events that have ever awarded awards, from 2019-mid2025 season inclusive
  19. 2. format that data into training data
  20. a. the Motivate award was a old award now discontinued, most closest translation is the Reach award
  21. b. some of the awards are sponsored and say so directly in data award title, so matched by regex instead
  22. c. also historically, a team could have one multiple awards!!! if i just filtered out events to only those where each team won one unique award, i lost like 90% of our training data. therefore, i worked around this
  23. 3. training!!!!! the most funnest part ever
  24.  
  25. exact raw data directly feeded in
  26. - history_slot_multihot [B, N, T, 24]
  27. - history_level_ids [B, N, T]
  28. - history_days_before [B, N, T]
  29. - history_season_gap [B, N, T]
  30. - history_same_season [B, N, T]
  31. - history_level_delta [B, N, T]
  32. - history_won_any_target [B, N, T]
  33. - history_target_award_count [B, N, T]
  34. - history_mask [B, N, T]
  35. - team_summary_features [B, N, F]
  36. - team_mask [B, N]
  37. - event_level_id [B]
  38.  
  39. exact raw data directly outputted
  40. - auxiliary_slot_logits [B, N, 24]
  41. - any_award_logits [B, N]
  42. - event_has_awards_logits [B]
  43. - award_depth_logits [B, 8, 4]
  44. - slot_team_logits [B, N, 24]
  45. - no_award_assignment_logits [B, N]
  46.  
  47. kinda complicated right?
  48. well, not really (this is a lie)
  49. when it says [B, N, T, 24] each of those numbers represents one dimension, B is batch size, N is # of teams, T is # of historical features (events), and a number is some sort of constant (there are 24 different exact awards, and 8 categories of awards)
  50.  
  51. each event also gets assigned a level depending how prestigious it is, the days before the current event undergoing inference, and some nice flags to help the model out (see above). take all these features, put through a bidirectional MLP (multilayer perceptron) and through a bidirectional GRU (gated recurrent unit). **think of the MLP as detecting all of the patterns in the data, and the GRU as extending those patterns over time and extrapolating output from the patterns.** scale attention across time, because an award from like 2024 is 6767% more important and tells us more than an award from like 2019. attach this to the teams overall summary data. it doesnt include the team number, because we don't want the model to learn patterns from *that*. tack on a roster, run it through a transformer encoder to contextualize it to the participating teams and their history, and the input data is basically good!
  52.  
  53. the model spits out bunch of data that is much more straightforward. just read what the dimensions mean and what the label is
  54.  
  55. 4. more training!!!
  56.  
  57. we can't just be throwing the model into the deep end, can we?
  58. nah that would not work out too well
  59. 2019-2024 seasons are training data, and 2025 season is validation data.
  60. we first auxiliary train the model for 5 epochs. think of it as helping it along. as long as it guesses that there is a award correctly, we call it good enough. this way, the model can first learn the general idea of what its supposed to do, before it gets throw in the deep end.
  61. then comes structured training!!! for 10 more epochs, now we use all of the data.
  62. on whether or not a team has awards, we do binary cross entropy loss, award depth, slots, and team assignments are obv not binary so we just do cross entropy loss.
  63.  
  64. 5. postprocessing
  65.  
  66. so basically we now just have a list of teams and their likelyhoods to win the given awards. ftr, i could NOT get slot_team_logits output properly working. i know in step 1 i said "scrape all events that have ever awarded awards" well i lied. i kinda scraped ALL events, and uh the # of events w/out awards GREATLY outnumber the # of events that have awarded awards, what a shocker. well, ts made it into the training data and i wasnt paying attention and it just kept guessing 0 awards always and most of the time it was right sooo uh yeah. i did not fix and retrain it because training it already took three days on my i3-1215u CPU, and i was on a deadline: march 7th, day of USMOKSCMP bc i told a guy on another team i would send him ts data so i was like fuh naw itll be fineeee
  67.  
  68. (it was fineeeeeee)
  69.  
  70. anyhoww..... i just did a monte carlo simulation on teh results and they are uniquely ranked in order of descending probability. as you can see, the results held up suprisingly well. the most important award is inspire bc it gives like 5 times the amount of advancement points as any other team, and it correctly guessed insp1 and insp2. i was personally suprised by it guessing insp2 (10265) correctly, because historically nothing about it stands out, but it predicted insp2 and they indeed won insp2! ngl 21225 (predicted insp3) got scammed out of it, i watched the livestream and they got scammed. anyhow the rest of the awards dont really matter as much bc they are worth equivalent point values, as long as the places are correctish everyone's happy.
  71.  
  72. 6 or 7. conclusion
  73.  
  74. i was pretty happy with how ts turned out, based on PURELY historical data this went super duper well. i learned a ton about pytorch and neural networks in general, fyi, 3 out of the 8 awards are based on public outreach and publicly available information, so i might try an llm based approach to those awards in the future. anyhow yeah hope you had an amazing time reading this yap and have a nice day :)
Add Comment
Please, Sign In to add comment