This is currently a simple proof of concept. The script generates a random "viable" unit composition, where viable is defined in the style of BeastyQT's "X to Grandmaster" challenge series.
Simply type either t, p, or z and receive your randomly selected unit composition:
Note: the numbers in brackets are just for testing purposes. Each unit is assigned a value, where 10 means the unit could win high GM games on its own. Then a set of units is randomly selected to have total value of between 10 and 15.
If no tier 1 units exist are selected, a limited number of additional early game units are added:
All races now implemented:
Every output unit composition is guaranteed to be able to attack anything in the game. For example, Oracle + Colossus would be automatically rejected as an invalid unit composition. (In grey areas, I err on the side of safety, so something like High Templar + Immortal would be rejected even though technically you could storm all air units, since it's not reliable in practice.)
Of course, human judgment supercedes simple algorithms, so if you get a ridiculous combination you can always reroll with just two keypresses.
Future refinements:
- Weighted unit sampling - give increased probabilities of selecting spellcasters and interesting units, to avoid selections like Roach + Hydra. Especially for zerg, this seems necessary to make interesting compositions.
- Matchup-specific unit values - for example, Adepts are very strong in PvZ but quite weak in PvT, so a PvZ Adept could have value 6 while PvT adept has value 2-3.
- Tune the numbers - unit values and min/max composition values were just pulled off the top of my head for a proof of concept. T/Z are especially unrefined.