GHOST solver
I want to draw attention to GHOST, a constrained optimization solver from 2014 that claims to be good for a wide variety of RTS problems. The lead is Florian Richoux, author of the protoss bot AIUR which was a strong contender in its day.
According to the description, GHOST should be good for Starcraft problems like designing a wall, placing static defense, choosing where to siege your tanks, planning build orders, optimizing your army composition, prioritizing targets to shoot at—a huge variety of things, actually. It claims to give answers not too far from optimal and to be fast enough to run within a single frame (though it will depend on what problem you’re solving).
- the paper: GHOST: A Combinatorial Optimization Framework for Real-Time Problems (pdf)
- the code: richoux/GHOST (github)
I haven’t tried GHOST and I don’t intend to, because it is under a GPL license, which rubs me the wrong way. But if is as good as the paper says, it could be a superb way to solve a lot of different Starcraft problems.
Comments
AIL on :
The problem is:
There is a bug my bot only has on stream but not at home.
On stream the bug occurs in 100% of ZvPs (3 out of 3 so far) and at home it never happens (at least 10 games without it ever happening since it first happened on stream about 2 days ago).
It never happening is also what the code suggests.
I have rules when to build an extractor and the bot applies to these rules in ZvZ and ZvT as well as at home in all matchups. ZvP uses a slightly different build (hatch 1st). But on stream this becomes extractor first.
And against all somewhat competent protosses this is an auto-loss. When I download the DLL of my bot from the side and run it, it also doesn't happen.
It's like a part of the old weird UAB gets revived and overrules my code to make me lose.
I have no logical explanation for that and also have no approach for debugging it. I mean when I test locally the bug simply isn't there! This frustrates me to no end, as you might imagine!
MicroDK on :
Jay Scott on :
krasi0 on :
Florian Richoux on :
I can add some pieces of information:
1. GHOST aims to make life easier for a dev to model his/her optimization problem but know nothing about constraint optimization. He/she models the problem (or take a model already available in the framework), then the inner framework solver deals with solving that problem.
2. So far, I am not fully happy with the framework: the solver performances are honestly really good, but modelling a problem remains too difficult compare to my initial objective. I am rewriting this part but unfortunately I don't have to much time to spend on this. I hope to be able to propose a new version by the end of this summer, but I won't promise anything.
3. Currently, the tested problem were GHOST is the less efficient is the target selection problem : it needs 150ms to have a good answer, which is way too long (GHOST aims to solve problems within 10ms or so). It comes from the fact that I rushed the model for this problem and never took the time to make it better. There is clearly room for improvement!
4. There exist 3 version of GHOST so far: one C++14 GNU GPL v3 version, one C# GNU GPL v3 version and one C# proprietary version. I sold a licence of this last one to the game studio Insane Unity; they are using it for the AI of their MMORTS game "Win That War!" (should be release next month normally, in early access on Steam). GNU GLP v3 is important to me: if you want to use GHOST for scientific purpose, it should be free. If you want to use it for a close-source program such a commercial game, then buy a licence.
5. Last but not least: I want to extend the library to Stochatic CSP in order to handle uncertainty in models. It's a long shot since no efficient meta-heuristics exist to solve Stochastic CSP models without converting them first into classical CSPs (what I do not want to do).
Cheers!
Flo
MicroDK on :
Florian Richoux on :
Yes, it is possible to use GHOST for unit composition as soon as you find a good optimization problem formulation (like I have X minerals and Y gas and a given number of production buildings, what can I produce now to maximize my DPS, for instance).
No matter you are a researcher or not: you can use GHOST in your code. Actually, there are two cases:
1. If you do not aim to release your code (ie, it's just a code for you and your own purpose executed on your personal computers), then you do not need to do anything particular.
2. If you plan to release your code, then it must respects GNU GPL v3 terms (see https://www.gnu.org/licenses/quick-guide-gplv3.html).