Skip to content
DrInfy edited this page Apr 22, 2020 · 10 revisions

In order to run games, use

python run_custom.py -map <MapName> -p1 <player1> -p2 <player2>

Use -h to get full list of arguments and list of bots and maps

python run_custom.py -h

Sharpy can run games between...

  1. Bot vs. Bot
  2. Bot vs. in-game AI
  3. Human vs. Bot (real-time)
  4. Human vs. in-game AI (real-time)

Bots may be other Sharpy bots or ladder bots.

Bot names can have arguments and the parameters are separated by ".". ai.random.veryhard would be ingame ai, random race with very hard difficulty.

Ladderbots can be added to ./Bots Folder, with each ladder bot having their own folder named after the bot. Ladderbot names in run_custom are case sensitive.

in run_custom games you can overwrite your release settings by having a config file in config-local.ini that overwrites the defaults ladder settings.

1. Bot vs. Bot

Zerg 12 pool against protoss proxy zealot rush on random map:

py run_custom.py -p1 12pool -p2 zealot 

2. Bot vs. in-game AI

Zerg 12 pool against in-game AI:

py run_custom.py -p1 12pool -p2 ai.terran.hard

3. Human vs. Bot

Human player needs to always be player 1. Realtime is turned on by default.

Human terran against cannon rush on on AcolyteLE map:

py run_custom.py -p1 human.terran -p2 cannonrush --map AcolyteLE 

4. Human vs. In-game AI

Similar to Human vs. Bot, but -p2 may be an in-game AI.

py run_custom.py -p1 human.terran -p2 ai.zerg.veryhard --map AcolyteLE 

Batch running and result analysis

In order to run multiple games, you can create a python script for that.

import subprocess
for n in range(1,100):
    subprocess.call("python run_custom.py -p1 mybot".split(" "))

This would run "mybot" against random opponents in random maps for 100 games in Windows.

You can use Sharpy log parser to parse results from game log files.

Clone this wiki locally