archive by month
Skip to content

the winning attitude

I compare 3 idealized attitudes a game programmer might take. Real people aren’t so simple, of course, but it’s a way to think about attitude. In reality, you can pick your own goals, or you can not even think about it and just do what comes naturally, whatever. The only prescription here is if your goal is this, then these points may help you approach it.

the winning attitude

Trying to come out on top.

I think that working on a game program is a lot like working on an industrial process or business procedure: The principles of continuous improvement apply.

  • The goal is to reduce mistakes and inefficiencies.
    • To win, reduce the biggest play errors.
    • Thou shalt not suffer a bug to live. Even a minor bug detracts from your ability to understand what’s happening.
    • Code for clarity and reliability.
    • Test carefully to find bugs and understand what works and how.
    • When you have a choice, go after the big win first. Don’t go astray solving little problems when you can solve a big one.
  • Constantly try new ideas.
  • Objective data tells you which ideas live or die. Your intuition may often be wrong.
  • Never stop! There is no “good enough,” at most “good enough for today.”
  • Dig in and analyze details. The deeper and wider your understanding, the better your new ideas will be.

See how chess programmer Ed Schröder does it. Chess programs are mature, of course, and improve in much smaller steps than Starcraft bots, but there are similarities.

“There will be errors in the program—hundreds of them—and it is only through extensive testing that the errors can be found and corrected.” — Jonathan Schaeffer, One Jump Ahead

the academic attitude

Trying to understand.

Typical long-term goals are to find a powerful technique that works to solve many different problems, or to understand theoretically when and why a given technique works. In practice, academics usually have to settle for step-by-step progress like everybody else. Typical methods include simplifying the problem or tackling one aspect at a time, to make it more tractable. An academic will not consider the work done when the program is proven to work, but only when the theory behind the program is proven to work—I think that that theoretical inclination is the most important difference between the academic attitude and the winning attitude: Theoretical versus practical.

The academic attitude is responsible for a lot of great AI ideas, from alpha-beta to deep learning. I think that the winning attitude is responsible for the lion’s share of the refinements and practical tricks in putting the great ideas to use. The two attitudes don’t exclude each other, after all.

The paper “Evaluating Real-Time Strategy Game States Using Convolutional Neural Networks” by Marius Stanescu, Nicolas A. Barriga, Andy Hess and Michael Buro in the CIG 2016 proceedings is a good example of the academic attitude. The authors want to apply deep learning with convolutional neural networks, as in AlphaGo, to RTS games. It’s a big problem that can’t be solved in one short paper, only started. And they don’t start with a full-size game like Starcraft, they start with a greatly simplified game as a testbed to begin to get some insight. The key conclusion: “several orders of magnitude slower than the other evaluation functions, but the accuracy gain far outweighs the speed disadvantage.”

the hobbyist attitude

Having fun.

This is more freeform. No bullet list! Do whatever’s interesting, try crazy experiments because they might turn out entertaining. Or repeat other people’s successes, if you think that’s fun. Some people do.

Tscmoo’s terran nuke and protoss dark archon strategies are the hobbyist attitude at work.

Trackbacks

No Trackbacks

Comments

krasi0 on :

Fun read and I really like the grouping of the different approaches into just three categories. What other BW AI bots could you give as examples of each of the different classes? Where do you think my bot ends up? :)

Jay Scott on :

I don’t know how it happens, but somehow real people are more complicated than a few keywords. And besides, attitude shows more in development process than in results. I expect that knowledge and talent and hard work affect results more than attitude, at least for now. Having said that, I can tell how some bots FEEL to me—take it as an impression, not a judgment! Killerbot is the bot that (I feel) focuses most sharply on doing exactly what it must to win, no less and also not one line of code more. ZZZKBot is tightly optimized for a narrow strategy. Both seem to me like examples of the winning attitude at work. UAlbertaBot is an academic program, so maybe it’s an easy call, but it also has an academic feel, coded for ease of experimentation. Aspects of its play that were subjects of research are sophisticated, and aspects that were not are crude, like cardboard stand-ins until that part can be Properly Addressed. And ZerGreenBot calls one zealot in each group the Lord Commander and complains when you kill “my favorite Protoss_Photon_Cannon”, which is as good as pasting on a hobbyist-attitude label.

Jay Scott on :

Oh, also bots which are closed source like Krasi0 always smell to me a bit of the winning attitude. But who can see real motivations?

krasi0 on :

Yeah, so we agree that in my case, the winning attitude is predominant. Additionally, I seem to follow closely all of the points that you list under the WA, just *not* as much the following two:
- When you have a choice, go after the big win first. Don’t go astray solving little problems when you can solve a big one. (I frequently waste a lot of time on some micro optimizations /on some tiny aspect of the playing style/ which leaves me behind on the big picture)
- Constantly try new ideas. (not that often in my case)

On a side note, can we unanimously declare that the WA has won over the AA in terms of results? ^^

Jay Scott on :

In terms of results? Which results? :-) The goals are different. UAlbertaBot has never come in #1, but it did pioneer ideas that others took up. That is a result too. The winning attitude is about winning, so it may tend to win more!

krasi0 on :

Good question :P
Yeah, I meant results in terms of winning and getting towards the top of the ranking. I don't believe that many software developers would pay close attention to (or manage to notice) a project / idea that has delivered few to no results in terms of winning. Or has there been such a case?

Wrt UAlbertaBot, what are those successful ideas that have propagated throughout the community? I am only aware of the combat simulator (BOS or something like that) but by watching it in action on SSCAIT, I am not convinced that it's delivered on its promise. UAlbertaBot in particular seems to lose most of the battles it partakes in due to poor decision making (it tends to too frequently alternate between jumping into battle and fleeing) which leads to the opponent taking free shots at its army.

OTOH, I remember having heard of some more interesting and promising AI ideas in the BW AI community during the last few years, but somehow they have been mostly very poorly implemented and again the lack of notable results during competitions seems to have lead to those ideas being consigned to oblivion.

So in the end, it's not just about ideas. In today's world, ideas proliferate quickly and are rather cheap, but implementing them in a successful manner still remains a tough challenge.

Jay Scott on :

The combat simulator and the build order search, both ideas which have been taken up by others. Also they both improve UAlbertaBot’s play, even though they have easy-to-see weaknesses as implemented. So yes, implementation is a challenge. :-)

krasi0 on :

There is another quote I like about ideas: "Don't worry about people stealing your idea. If it's truly original, you will have to ram it down their throats." ^^

Jay Scott on :

It’s also said that if you build a better mousetrap, people will beat a path to your door. :-) The dueling proverbs both have some truth!

krasi0 on :

Well, D Churchill claims to be a really proficient software developer (he even used to stream himself coding the bot so that "others can learn from him") and I know that he's spent (at least) many months working on Ualbertabot, so I am still unsure what the weak link is in his case: the ideas themselves, the implementation, both?

Jay Scott on :

Research first. SparCraft and BOSS are the main research products (well, their writeups are the main products), and I think they’re both strong. I think it is their integration into the rest of the program that shows weaknesses. For example, BOSS is capable of finding near-perfect macro sequences including adding production buildings at the optimal times, but in practice UAlbertaBot sometimes has rotten macro. BOSS’s full power is not exploited.

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options

Submitted comments will be subject to moderation before being displayed.