Hierarchical Expert Prompt for Large-Language-Models: An Approch Defeat Elite AI in TextStarCraft-II for the First Time

October 24, 2024 · View on GitHub

2024/6/16 Zongyuan Li, Chang Lu, et. al.

College of Artificial Intelligence, Nankai University, Tianjing, China + Laboratory for Big Data and Decision, National University of Defense Technology, Changsha, China

paper: Our paper is currently under review and is expected to be published soon. You can contact us by emailing 2120230524@mail.nankai.edu.cn or 734162621@qq.com.

Quick Start

  1. Install TextStarCraft II

Download the repository: https://github.com/histmeisah/Large-Language-Models-play-StarCraftII/tree/e34e1f3d605f30000a75527c93908f4588175008 , follow the instruction in their README to install TextStarCraft II.

  1. Build HEP-Agent

2.1. Replace YOUR_PATH\Large-Language-Models-play-StarCraftII-main\sc2_rl_agent\starcraftenv_test\prompt\prompt.py with prompt.py in our repository.

2.2 Replace YOUR_PATH\Large-Language-Models-play-StarCraftII-main\sc2_rl_agent\starcraftenv_test\worker.py with worker.py in our repository.

  1. Test the HEP-Agent

Run a demo according to the baseline repository README, make sure the target worker of multiprocess.process is the redefined 'def chatgpt_worker', and the sc2prompt in chatgpt_worker is our 'class StarCraftII_HEP'. replay video can be viewed on https://www.bilibili.com/video/BV1uz42187EF and https://youtu.be/dO3PshWLV5M.

Results

Comparison on different decision-making methods

WorkAlphaStarSCCHierNet-SC2AlphaStar UnpluggedROA-StarBaseline(CoS)Ours
MethodSL+RL+self-playSL+RL+self-playdata-mining + RLoffline RLSL+RL+self-playprompt + Rule base scriptprompt + Rule base script
Compute resource12000 CPU cores, 384 TPUsLinear4 GPUs,48 CPU coresnot clear2x 64 v1001 gpu,1 cpu(home computer)1 gpu,1 cpu(home computer)
Required replay971,0004,63860820,000,000(20m)12093800
Best result(The greatest opponent ever to win)Serral(One of the best progamer in the world)Time(IEM2023 Champion)build-in ai lv-10AlphaStar BC agenthero(GSL Champion)build-in ai lv-5build-in ai lv-7
Strategy Interpretability
Expansibility(adapt to latest game version and other race )

Win Rate Comparison of LLM Agents Against TextStarCraft II's Built-in AI

PromptLV1LV2LV3LV4LV5LV6LV7
Baseline(Prompt1)7/86/92/81/80/80/8TBD
Baseline(Prompt2)8/89/98/821/257/140/12TBD
OursTBDTBDTBD12/129/129/123/12

Cite

Our paper is currently under review and is expected to be published soon. Some part of our codes is temporarily locked, to protect our result until paper be published. You can contact us by emailing 734162621@qq.com temporarily.