• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 11:01
CET 16:01
KST 00:01
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL21] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy5ByuL: The Forgotten Master of ZvT30Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289
Community News
Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool40Weekly Cups (March 9-15): herO, Clem, ByuN win42026 KungFu Cup Announcement6BGE Stara Zagora 2026 cancelled12Blizzard Classic Cup - Tastosis announced as captains18
StarCraft 2
General
Blizzard Classic Cup @ BlizzCon 2026 - $100k prize pool Potential Updates Coming to the SC2 CN Server Weekly Cups (March 2-8): ByuN overcomes PvT block Weekly Cups (August 25-31): Clem's Last Straw? Weekly Cups (March 9-15): herO, Clem, ByuN win
Tourneys
World University TeamLeague (500$+) | Signups Open RSL Season 4 announced for March-April Sparkling Tuna Cup - Weekly Open Tournament WardiTV Team League Season 10 KSL Week 87
Strategy
Custom Maps
Publishing has been re-enabled! [Feb 24th 2026]
External Content
Mutation # 518 Radiation Zone The PondCast: SC2 News & Results Mutation # 517 Distant Threat Mutation # 516 Specter of Death
Brood War
General
Soulkey's decision to leave C9 JaeDong's form before ASL BGH Auto Balance -> http://bghmmr.eu/ [ASL21] Ro24 Preview Pt1: New Chaos ASL21 General Discussion
Tourneys
[ASL21] Ro24 Group A [Megathread] Daily Proleagues ASL Season 21 LIVESTREAM with English Commentary [BSL22] Open Qualifiers & Ladder Tours
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers Soma's 9 hatch build from ASL Game 2
Other Games
General Games
General RTS Discussion Thread Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile Dawn of War IV
Dota 2
Official 'what is Dota anymore' discussion The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Five o'clock TL Mafia Mafia Game Mode Feedback/Ideas Vanilla Mini Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine YouTube Thread Canadian Politics Mega-thread Russo-Ukrainian War Thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
[Req][Books] Good Fantasy/SciFi books Movie Discussion! [Manga] One Piece
Sports
2024 - 2026 Football Thread Cricket [SPORT] Formula 1 Discussion Tokyo Olympics 2021 Thread General nutrition recommendations
World Cup 2022
Tech Support
Laptop capable of using Photoshop Lightroom?
TL Community
U4GM Tips Counter Enemy Gadgets Fast in Black Ops rsvsr How to Keep Reward Chains Rolling in Monopol u4gm What to Do First in MLB The Show 26 Spring
Blogs
Funny Nicknames
LUCKY_NOOB
Money Laundering In Video Ga…
TrAiDoS
Iranian anarchists: organize…
XenOsky
FS++
Kraekkling
Shocked by a laser…
Spydermine0240
Unintentional protectionism…
Uldridge
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1528 users

Towards a good SC bot - P5 - H.I. (2/2)

Blogs > imp42
Post a Reply
imp42
Profile Blog Joined November 2010
398 Posts
Last Edited: 2017-02-04 04:36:34
February 04 2017 04:11 GMT
#1
Towards a good StarCraft bot - Part 5 - "Human Intelligence (2/2)"

Sumary:
+ Show Spoiler +
An artificial intelligence cannot count on intuitions and experiences, e.g. about how physics works, to draw conclusions about game mechanics. Even if it could, it cannot interpret the pixel data without being given any pointers. The reason why we are better at games is because we draw from many different components. So a good A.I. bot should do the same.


My last post in the series dealt with human intelligence and how humans work.

I finished with the following outlook: “In a next post, I will attempt to map the cognitive capabilities to attributes of an artificial intelligence, compare strengths and weaknesses and hopefully lay out a road map to cover current deficiencies of bots.”

Before getting to that, let’s start with a guide on how to not think like a human

Section 1: How to not think like a human

Sometimes we may ask ourselves why machines are so bad at doing something that seems so easy to us. A well-known blogger asks why a machine needs tens of thousands of iterations evolving a neural net to play something as simple as a game of pong. After all, we humans are able to learn the game within just a few minutes.

In my opinion such questions are based on a misconception. Most notably our tendency to think that we are smarter than we actually are. Our brain is not the general-purpose intelligence machine you may think it is. In fact, it is very optimized for problems and situations that are expected to occur in nature. Our brain also takes a lot of shortcuts to get great results in most of the cases. A well-tuned heuristic approach, so to speak. Those shortcuts however, come at a cost. This is best visualized via a wide range of optical illusions, which mercilessly exploit said shortcuts to trick us into viewing something that isn’t there.

Another very sensible shortcut we take is the fact that we come pre-equipped with a physics engine. 6-month-old babies already understand basic concepts such as the law of inertia or simply the fact that if an object is there now, it will probably still be there in a second.

Here comes the second misconception: games like pong (actually I would bet almost any game we have invented) are not necessarily easy, but follow a specific set of rules that is very familiar to us humans. If you press “up” on your controller, your pong bad will move up. If you press it again, it will still go up. If the pixels representing the ball are in the middle of the screen now and were a bit to the left a second ago, they will probably shift a bit to the right in the future, because the ball movement is simulated to follow a physical law and keeps its direction until it hits an obstacle.

Now take a step back and imagine a game of pong which does not follow any rules we already knew as a baby. Let’s say the ball just appears anywhere on the screen in a pattern that is predictable, but very hard to spot. Would we still fare better than the A.I. programs? Certainly not. In fact, the machine would probably beat us to finding such an unnatural pattern.

If we want to understand the challenges of A.I., for example in the field of Brood War, we must think like a machine. When a machine is fired up for the first time it knows nothing. Absolutely nothing at all. No wonder a neural net takes a very large number of iterations to become good at a particular task if it has to rediscover all of nature’s laws via trial and error first, right?

Let’s apply this line of thinking to Brood War and ask some questions that seem silly to us, because we instantly know the answer:

  • What choke on the map should I protect with my units before I expand to my natural? What’s a choke anyways?
  • If my win condition is to have zero enemy buildings on the map, why should I mine minerals first? (LetaBot, winner of the SSCAI tournament 2016, doesn’t know the answer to this one either :p)
  • How could a map with very short rush distances potentially influence the game?
  • So the opponent just stole my gas. What do I do now?

Now try answering these questions imagining you have no previous understanding whatsoever and start with a blank state.
Let's pick the rush distance as an example: Without knowing or having an intuition about s = V / s (time = speed / distance) how could you possibly connect the dots to conclude that a shorter distance between bases will make the enemy units arrive sooner? Remember the A.I. doesn't know anything unless it is told! (you don't want your bot to have to rediscover classic physics on its own every time you start it...)

Recently I saw an old edition of Brood War “pimpest plays”. Video: + Show Spoiler +

At the 2 minute mark the zerg player needs gas, but his last drone is threatened by a Wraith. The impressive solution is to repeatedly use dark swarm to protect the drone from the Wraith, escorting the drone step by step all the way to the geyser. How did the human player come up with this creative solution? He did the following reasoning within seconds:

  1. Opponent has a Wraith, I need to counter with a Scourge
  2. I need gas to train a Scourge, but I don’t have any
  3. I need to mine gas, so I have to send a drone to the geyser
  4. There is only one drone left, so send it
  5. The drone is being attacked by the Wraith and will likely die before it reaches the geyser
  6. I can protect the drone from ranged Wraith attacks by using a Dark Swarm
  7. For Dark Swarm I need a Defiler. I happen to have one, so I use it
  8. I cast the Dark Swarm in a way such that the drone can close the distance to the geyser
  9. Further Dark Swarm spells are required to cover the remaining distance, but the defiler doesn’t have any energy
  10. Consume a Zergling to regain energy
  11. Cast another Dark Swarm and repeat the procedure until the drone reaches the geyser

How will a bot ever be able to devise such a plan? Note that the concept of covering something from the vision of a third party is very natural to us. It is part of the physics engine we are hardwired to intuitively understand, just like the relation between distance, speed, and time. It also makes intuitively sense that melee units can still attack in a Dark Swarm, but ranged units can’t. But a bot has none of this knowledge and experience at its disposal. It needs to understand what the spell does and how it can be applied without being able to base such learning on its intuition of how things are supposed to work.

Also, I am fairly certain that the Deepmind approach, using neural nets that learn from pixel data will not suffice. After all, not even us humans, equipped with a pre-tuned specialized brain, learn a new game just by looking at it. Instead, we immediately interpret what we see and apply known rules to it to deduce new facts. By the way: one of the shortcuts mentioned earlier is the fact that we excel at visual pattern recognition. To the point, we even recognize patters where there aren’t any (in clouds or peanuts or random wood that “looks exactly like the face of Jesus”).

Let’s take famous Super Mario as an example. From a few pixels on the screen we immediately recognize it is supposed to depict a human being. It has legs, so it can walk. When Mario walks all the other pixels move right to left. This means Mario is moving left to right and the camera changes with him. It will require dedicated action to make him jump, but he will get down by himself due to gravity. Other characters are likely to be enemies if they frown or throw stuff at us, but friends if they smile. All of this knowledge that we are born with or have acquired outside the game help us mastering the game faster. Because we don’t reason over the raw data (pixels) but over our interpretation of the raw data (Mario).

Bots can’t do that. They are unable to interpret a syntax semantically and attach a meaning to their input. But what if we gave them some support to at least take the first steps in this direction?

Section 2: How to think like a human: mapping cognitive abilities

This brings us back to the initial “silly questions”.

  • What choke on the map should I protect with my units before I expand to my natural? What’s a choke anyways?

There are algorithms able to define what a choke is. And they have been shown to produce classifications similar to the ones done by humans (see BWTA and this paper)

But what is lacking is an interpretation. Apart from the idea of coupling a physics engine to a neural net, which in a way couples experience to learning ability, further progress can be achieved by adding dedicated components corresponding to the cognitive abilities:

Attentional control: the decision making involved in deciding what information streams to pay attention to, whether to process them and how to process them. Thread scheduling.

Example: We may decide to ignore the audio channel in our bot. Or we may use a classic tree-based search and need to decide what branches to prune and what branches to calculate in more depth = pay more attention to.

Working memory: the system responsible for holding, processing, and manipulating information. This definition for humans can be applied 1:1 to bots. It includes not only how much memory is available, but also the structure of it. The structure determines how fast memory read and write operations are and makes a trade-off between speed and size.

Examples: use a linked list of all units encountered in the game (fast delete, O(n) search). Cache pre-calculated income curve calculations. Load a heat map into memory consisting of condensed snapshots from every 10 second interval of all past games the bot has played.

Reasoning: a database containing facts and rules, as well as the ability to draw conclusions. The Prolog programming language provides a direct implementation of this ability.

Example: Facts about unit stats and rules how they interact allows reasoning as to how to counter a specific enemy army composition.


Problem solving: Probably best mapped to computational pattern recognition. Very generally spoken it is the ability to detect pattern on an adequate level of abstraction such that solutions from known problems can be applied. Pattern recognition covers an entire branch of machine learning.

Example: abstract the scenario of blocking a ramp with SCVs to prevent a Zergling rush to blocking any kind of melee unit with any other unit. This ability can then potentially be applied in unforeseen situations.

Planning: the computational power to explore search trees and known relations to simulate future outcomes and then pick one outcome that satisfies the goal to achieve.

Example: A combat simulator or an algorithm to plan the safest route for a dropship.

Conclusion

Only when everything comes together can we reason: “my main is surrounded by non-walkable terrain, except for one exit. (attentional control) At this point, my opponent cannot have any flying units yet (Reasoning, working memory). Therefore, if he wants to attack any of my buildings or workers, he must move through the single choke (problem solving). I can block enemy units with my own units (working memory). On the entire path from his base to my base, the choke is the point where least units are required to fully block his path (problem solving). The earliest rush I have experienced so far arrived at the x minute mark (working memory). But this time we are cross-position, so I will adjust a bit and make sure I block my choke at the y minute mark. (planning)” etc.

How to glue all of this together?
I don't know. But I'm sure we will find out



*****
50 pts Copper League
nepeta
Profile Blog Joined May 2008
1872 Posts
February 05 2017 12:59 GMT
#2
Words of wisdom again, it's good that things like these are explained. Can't wait to see your bot in action btw!
Broodwar AI :) http://sscaitournament.com http://www.starcraftai.com/wiki/Main_Page
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
Last Edited: 2017-02-05 21:58:25
February 05 2017 21:57 GMT
#3
On February 04 2017 13:11 imp42 wrote:
An artificial intelligence cannot count on intuitions and experiences, e.g. about how physics works, to draw conclusions about game mechanics. Even if it could, it cannot interpret the pixel data without being given any pointers.

It can. Those google AI guys hooked their AI up with games like breakout and gave it no input other than the pixel data and a reward function. Worked like a charm.

video
If you have a good reason to disagree with the above, please tell me. Thank you.
imp42
Profile Blog Joined November 2010
398 Posts
Last Edited: 2017-02-07 14:33:38
February 06 2017 01:02 GMT
#4
On February 06 2017 06:57 spinesheath wrote:
Show nested quote +
On February 04 2017 13:11 imp42 wrote:
An artificial intelligence cannot count on intuitions and experiences, e.g. about how physics works, to draw conclusions about game mechanics. Even if it could, it cannot interpret the pixel data without being given any pointers.

It can. Those google AI guys hooked their AI up with games like breakout and gave it no input other than the pixel data and a reward function. Worked like a charm.

video

I am well aware of what Deepmind (acquired by Google) did with the Atari games.
but from my OP:

A well-known blogger asks why a machine needs tens of thousands of iterations evolving a neural net to play something as simple as a game of pong. After all, we humans are able to learn the game within just a few minutes.

Deepmind cannot interpret pixel data. And that is the reason it needs so many iterations to learn a simple game.
Actually that's what my blog post was about, so somehow I guess I didn't get the point across...

The video you linked even states in the first seconds "The algorithm does not know the concept of a ball".

It is absolutely a 100% completely ignorant to whether those pixels represent a car or a human or nothing.
It will never be able to interpret the pixels as e.g. a car and draw the conclusion that it might be able to drive it (because that's what you do with cars, you drive them). Instead it just reads an array of pixels and notices a pattern in that their color values shift to the right if it sends a specific input signal (we would say the car moves to the right if we press a specific button).

50 pts Copper League
opisska
Profile Blog Joined February 2011
Poland8852 Posts
February 07 2017 13:47 GMT
#5
you have shown pretty good ability to think about the issues and your writing about it is really good. however you still have an insane task of making it really work. are there kinds of "industry standarts" how to implement all the steps (attention control, reasoning, etc..) or is every problem too different and you have to reinvent everything?
"Jeez, that's far from ideal." - Serral, the king of mild trashtalk
TL+ Member
imp42
Profile Blog Joined November 2010
398 Posts
February 10 2017 23:04 GMT
#6
On February 07 2017 22:47 opisska wrote:
you have shown pretty good ability to think about the issues and your writing about it is really good. however you still have an insane task of making it really work. are there kinds of "industry standarts" how to implement all the steps (attention control, reasoning, etc..) or is every problem too different and you have to reinvent everything?

"industry standards" in the sense that e.g. languages like Prolog facilitate logic programming (reasoning), implementations of tree search have been explored in great depth ( ), and of course neural nets, which are great at iteratively optimizing a utility function, simulating learning. But yes, combining different approaches to form a whole is a real challenge.

For now, my proposal is to not look for the one general approach to cover every aspect of A.I., but to combine specialized solutions for sub-problems and e.g. apply neural nets selectively.
50 pts Copper League
Please log in or register to reply.
Live Events Refresh
Wardi Open
12:00
#79
WardiTV831
OGKoka 127
Rex112
IntoTheiNu 16
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Harstem 227
ProTech161
Rex 112
Trikslyr19
MindelVK 8
StarCraft: Brood War
Calm 10842
Bisu 3941
Horang2 1592
Jaedong 1568
Shuttle 934
Larva 638
Hyuk 619
BeSt 564
Stork 481
Mini 460
[ Show more ]
Soma 378
Light 378
Leta 243
Rush 227
Snow 194
Backho 119
ggaemo 103
Pusan 97
PianO 61
Sea.KH 59
[sc1f]eonzerg 57
Dewaltoss 51
Shinee 51
ToSsGirL 34
Nal_rA 32
Shine 31
910 30
Movie 30
Free 24
Aegong 21
IntoTheRainbow 19
soO 19
zelot 19
Hm[arnc] 18
sorry 17
GoRush 17
ajuk12(nOOB) 17
Noble 14
Terrorterran 11
Dota 2
Gorgc6305
League of Legends
Reynor76
Counter-Strike
fl0m3791
Fnx 2207
byalli1578
shoxiejesuss820
kennyS494
Other Games
singsing2162
hiko807
B2W.Neo694
XBOCT467
Beastyqt411
Lowko405
Happy225
OGKoka 127
Sick80
Mew2King61
oskar54
Organizations
Dota 2
PGL Dota 2 - Main Stream42
StarCraft: Brood War
Kim Chul Min (afreeca) 8
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• StrangeGG 28
• poizon28 3
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV316
• lizZardDota2119
• Noizen38
League of Legends
• Nemesis2909
Upcoming Events
Monday Night Weeklies
1h 59m
Sparkling Tuna Cup
18h 59m
Afreeca Starleague
18h 59m
Soulkey vs Ample
JyJ vs sSak
Replay Cast
1d 17h
Afreeca Starleague
1d 18h
hero vs YSC
Larva vs Shine
Kung Fu Cup
1d 19h
Replay Cast
2 days
KCM Race Survival
2 days
The PondCast
2 days
WardiTV Team League
2 days
[ Show More ]
Replay Cast
3 days
WardiTV Team League
3 days
RSL Revival
4 days
Cure vs Zoun
herO vs Rogue
WardiTV Team League
4 days
Platinum Heroes Events
4 days
BSL
5 days
RSL Revival
5 days
ByuN vs Maru
MaxPax vs TriGGeR
WardiTV Team League
5 days
BSL
6 days
Replay Cast
6 days
Afreeca Starleague
6 days
Light vs Calm
Royal vs Mind
Wardi Open
6 days
Liquipedia Results

Completed

Proleague 2026-03-22
WardiTV Winter 2026
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
BSL Season 22
CSL Elite League 2026
CSL Season 20: Qualifier 1
ASL Season 21
Acropolis #4 - TS6
RSL Revival: Season 4
Nations Cup 2026
NationLESS Cup
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual

Upcoming

2026 Changsha Offline CUP
CSL Season 20: Qualifier 2
CSL 2026 SPRING (S20)
Acropolis #4
IPSL Spring 2026
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.