Pathfinding Showdown – printf’s Sneaky Probe

This Challenge is in Beta

Pathfinding Showdown – printf’s Sneaky Probe

Printf, the infamous Protoss cannon rusher, has devised a new cheese strategy, but he needs his probe to reach the proxy location without getting caught. The probe must navigate the terrain efficiently, dodging enemy units and impassable terrain while making its way to the beacon.

Time is critical—if the probe is delayed, the rush will fail, and Printf’s meme-worthy legacy will be in jeopardy!


Challenges

  • Challenge 1: Navigate to predefined beacon locations as efficiently as possible.
  • Challenge 2: Find the beacon that spawns in a random location while avoiding enemy units.

Objective

Write a pathfinding code that guides Printf’s probe from the Protoss main base to the beacons located at:

Beacon Area - 1: [35.27, 140.06]
Beacon Area - 2: [47.20, 108.33]
Beacon Area - 3: [107.07, 112.04]
Beacon Area - 4: [137.66, 136.96]
Beacon Area - 5: [134.84, 69.69]
Beacon Area - 6: [84.90, 109.94]

  • Challenge 1: The beacons spawns in predefined locations, and your goal is to find the most efficient path to reach them.
  • Challenge 2: Enemies are now on the map, navigate to the beacons won’t losing your probe

Rules

  1. No Direct Move Commands
    • You cannot use unit.move(), unit.attack_move(), or any direct move variation.
    • Your bot must calculate its own path and issue movement step by step.
  2. Pathfinding Logic
    • Your bot must determine its route dynamically without relying on SC2’s built-in navigation.
  3. Avoidance and Efficiency
    • The probe should move efficiently while accounting for obstacles and potential threats.

Setup

  1. Download Maps: Download Here and place them in your StarCraft 2 Maps folder.
  2. Clone the Repository: Clone the challenge repo from GitHub.
    git clone https://github.com/Vers-AI/ch-sc2-pathing
    cd ch-sc2-pathing
    
  3. Set Up Environment: Create and activate a virtual environment.
    python -m venv venv
    # Then activate it:
    venv\Scripts\activate  # Windows CMD/PowerShell
    source venv/bin/activate  # Mac OS / Linux
    
  4. Install Dependencies:
    pip install -r requirements.txt
    
  5. Run the Challenge:
    python ./run.py
    
  6. Switching to Challenge 2:
    • Change the map in config.py by modifying this line:
      DEFAULT_MAP = "LightShade_Pathing_0"
      
    • Update it to:
      DEFAULT_MAP = "LightShade_Pathing_1"
      

Resources


Hints

  • Analyze the Map: Load SC2MapAnalysis, find regions, and identify unwalkable areas.
  • Move the Probe: Implement step-by-step movement instead of issuing a direct move command.
  • Debugging: Use SC2MapAnalysis debug & drawing tools to help you find your path

Stretch Goal

Optimize your pathfinding algorithm to minimize travel time and avoid unnecessary detours.