# I made a simple statistical match simulator

http://www.tourdegiro.com/personal/robosim/

Basically, you plug in a bunch of estimates for how long it takes to do various things, and it tells you how many points on average “your robot” would take to do those things (after simulating 2500 matches), and gives you a sample match log.

Think it sucks? Github is here, make it better! (license: do whatever you want. Modify it, fork it, sell it, claim it is yours, etc)

The simulated robot’s strategy is:

1. Get the closest ball it can
2. Shoot the ball
3. Goto 1

For assigning RPs, it assumes all your alliance’s robots challenge or scale the castle, and so the castle RP boils down to your robot doing enough damage.

It does not simulate other robots, other than randomly making it harder to line up or get balls in the courtyard, depending on the defense parameters you plug in.

When a choice is available (passive vs active defenses or high goal vs low goal), the simulated robot will choose the one that has a lower expected time to complete, if there are points available for that task.

It does not simulate autonomous. Your robot starts in the courtyard without a ball though (as if you shot during autonomous).

It does not give you the straight-up points for the challenge/scale or for autonomous. It’s solely meant to simulate steady-state teleop.

This is really cool! I’ve only spent a couple of minutes with it and love how easy it is to use and how straightforward the output is. I’ll have to play with it more based upon similar games’ videos to determine actual times to get balls, etc.

This is actually really good for helping you determine what’s possible (if you put realistic numbers in there)

I believe the low/high goal needs to be corrected. I cannot get it to do a mix of the two. It seems to only rely on which is faster (and if a tie, do only high)

Yeah, that’s how the code is written. If expected lineup+shooting time is shorter for one method, that’s what they’re going to try to do. It doesn’t do an expected-value calculation because in my experience, drive teams don’t plan on missing.

My justification is that a drive team will tend to always pick one in their strategy anyway, and they don’t plan on missing, so accuracy doesn’t get taken into account.

Edit: I just noticed I never pushed the actual app to github. Embarrassing…

Thanks for making this! It would be awesome if there was a way to choose to get your balls from only the secret passage (because the simulator tends to choose to use the balls from the neutral zone pretty often, even if the times to get them are extremely high).

That’s a good point! You’re right that it always tries to get balls in its current sector (or, if in the courtyard and no balls available, in the neutral zone), rather than traversing to a location where they might be easier to get like your home secret passage. I should add that.

I didn’t model the opponent’s secret passage as a source to get balls, since the availability of balls there depends on a lot of very dynamic factors, like the behaviour of other robots, penalties, defensive play, etc.

Due to the relative greater accuracy required by high goal shooters, perhaps a separate multiplier for defense bots for high goal vs low goal shots may be necessary?