Retro Gaming

From Rules to Deep Learning: How Game AI Evolved Through the Classics

Game AI in retro titles charted the roadmap for today's hits

Retro Alex

Starting with the simple Pong in the 1970s, AI subtly influenced how we played and interacted with games. As we moved into the 1980s and 1990s, games like Pac-Man and The Legend of Zelda added more layers. By the early 2000s, games were richer and more dynamic, thanks to AI’s growing influence.

We’ll peel back the layers of some beloved classics to see how AI was the hero, guiding our digital adventures, and influenced game AI today. So, let’s jump in and explore how AI made the magic happen in the golden age of gaming.

Setting the Stage: Gaming in the 1970s

Imagine a world where video games were just taking their first steps. That’s the 1970s. During this time, games were like basic sketches compared to the colorful paintings we see today. The technology was young, but it held promise.

Enter Pong. This simple tennis-like game introduced us to AI in a playful way. Picture two kids playing catch. One throws the ball, and the other catches it. In Pong, AI acted as one of those kids, ensuring the ball was always thrown back. No fancy moves, just straightforward action.

In Pong, the AI behaves like that smart wall. When you serve the ball or strike it towards the AI paddle, the computer-controlled paddle begins moving vertically, aligning itself with the ball’s path.

However, it’s worth noting that the paddle doesn’t cheat. It doesn’t snap to the ball’s position. Instead, it moves at a defined speed, making calculated adjustments to ensure it intercepts the ball. This movement creates the challenge, as sometimes the paddle might not reach the ball in time if the player’s shot is fast or well-angled.

The AI in Pong is always trying to match your moves in real-time, ensuring the game remains engaging and competitive. It was this foundational concept that paved the way for more intricate AI designs in video games that followed.

The 1970s set the gaming stage with these foundational games. It was a decade where the gaming world was exploring its potential, and AI was right there, holding its hand.

1980s: Complexity and Character AI

The 1980s was a decade marked by boldness, innovation, and a palpable sense of wonder in the world of gaming. But behind the joystick movements and pixelated screens, a silent revolution was brewing. AI was stepping out of the shadows, moving from the background to the forefront of gameplay. Games were no longer just about scoring points or completing levels; they became experiences, tales of adventure and challenges that felt personal and real.

This era wasn’t just about adding more pixels or louder sound effects; it was about adding depth, personality, and a hint of unpredictability.

Diving into the Maze: The AI of Pac-Man

The 1980s welcomed a game that would become a cultural icon: Pac-Man. With its simple objective of eating dots and avoiding ghosts, it might seem straightforward at first glance. But there’s more than meets the eye.

Think of Pac-Man as a game of cat and mouse. You’re the mouse, eager to collect cheese (dots) scattered around your house (the maze). Now, imagine four different cats trying to catch you, each with its unique approach.

Each ghost in Pac-Man had its own strategy, making the game unpredictable and exciting. Blinky, the red ghost, was the direct chaser, always on Pac-Man’s tail, like a dog pursuing a car. Pinky, the pink ghost, tried to predict Pac-Man’s next move, positioning itself ahead, much like an outfielder in baseball anticipating where the ball will land.

Inky, the cyan ghost, was trickier. His movements were based on both Pac-Man’s position and Blinky’s position, making him an unpredictable foe. It’s akin to a chess player, thinking two moves ahead. Lastly, Clyde, the orange ghost, had a mix of behaviors. Sometimes he chased Pac-Man directly, while at other times he just wandered around, like a child distractedly following a butterfly.

What made Pac-Man so captivating was this blend of strategies. Players had to think on their feet, adapt, and outmaneuver each ghost’s unique AI pattern. It wasn’t just about reflexes; it was a game of wits.

Pac-Man laid down a marker for what game AI could achieve. It transformed a simple maze game into an intricate dance of chase and escape, ensuring its place in the annals of gaming history.

Embarking on an Adventure: The AI in The Legend of Zelda (1986)

The year 1986 gifted gamers with an epic quest in the form of The Legend of Zelda. This game wasn’t just about sword swings and puzzle-solving; it introduced a world alive with creatures, each acting with a purpose.

Imagine venturing into a dense forest. Each animal you encounter has its behavior. Some might be curious and approach you, while others might hide, waiting for the perfect moment to surprise you. The Legend of Zelda mirrors this lively forest setting with its array of creatures.

The AI in The Legend of Zelda (1986) was largely rule-based, which was common for games of that era. Rule-based AI operates on predefined sets of rules, with the game entities (like enemies) reacting to specific conditions based on these rules. This approach allows developers to have a controlled environment while giving the illusion of intelligent behavior.

Take the Octoroks, for instance. These creatures, resembling octopuses, would hide and shoot rocks at players from a distance, much like a squirrel tossing acorns from a tree branch. On the other hand, Moblins, goblin-like foes, patrolled certain areas, guarding their territory like watchful hawks circling overhead.

Then there were the clever Wizzrobes. These magical adversaries teleported around, making them unpredictable and challenging to pin down, akin to trying to catch a mischievous fairy darting in and out of sight.

The game’s brilliance lay in this diversity of enemy behavior. Each encounter required strategy, anticipation, and quick reflexes. Players had to learn, adapt, and grow, much like a young explorer learning the ways of the wild.

The Legend of Zelda used game AI to turn the digital landscapes of Hyrule into a living, breathing world, setting the stage for countless adventures that would follow in its footsteps.

Building Dreams and Challenges: The AI in SimCity (1989)

1989 marked a shift from mythical quests and arcade chases to the bustling streets and skyscrapers of SimCity. This game wasn’t about defeating monsters; it was about crafting a world, brick by brick.

At its heart, SimCity was driven by a rule-based AI system. Every choice a player made had consequences. For instance, placing a factory near a residential area might lower the happiness of your virtual citizens, just as a noisy factory might upset neighbors in the real world.

Traffic patterns were another AI marvel. If you’ve ever set up dominoes in a line and tipped one over to watch the cascading effect, that’s how roads and traffic functioned. Place a popular destination without adequate roads, and you’d soon see virtual traffic jams, reminiscent of the Monday morning rush.

The game also used AI for its “disaster scenarios.” For example, if you built a city without adequate fire stations, fires could spread rapidly, just as dry grass can fuel a real-life wildfire. The game’s AI evaluated player decisions, simulating the ripple effects throughout the virtual city.

What made SimCity stand out was its simulation depth. The AI wasn’t just about reaction; it was about interaction. Each decision had layers of impact, forcing players to think, plan, and strategize.

SimCity was a living ecosystem, a testament to the potential of AI in shaping immersive, dynamic worlds. As players sculpted their dream cities, the AI ensured those cities pulsed with life, challenge, and consequence.

1990s: Advancements in Strategy and Simulation

The ’90s wasn’t just about faster processors or flashier graphics. It was a golden age for strategy and simulation games. And advanced AI systems were pulling the strings behind the scenes.

Earlier games had AI that followed a set routine. But the 1990s introduced AI that could learn new moves, react to the situation, and even improvise when faced with an unexpected opponent. The AI was no longer predictable. It could adapt, strategize, and even surprise players.

As titles grew in complexity, so did the AI driving them. Gamers weren’t just playing against a machine; they were engaging with a dynamic, responsive, and intelligent entity, setting the stage for the gaming marvels heading into the new millennium.

Building Empires with Wit: The AI in Sid Meier’s Civilization (1991)

In 1991, the gaming world witnessed a revolution. Sid Meier’s Civilization was an epic journey through human history, a board game that spans millennia. Starting with a single settler, players would nurture a civilization, guiding it from the wheel’s invention to the space age. But here’s the twist: you’re not playing alone.

Civ’s AI acted like fellow board game enthusiasts seated around the table. Each AI-controlled civilization had goals, strategies, and even emotions. Diplomacy was key. For instance, if you were a kind neighbor, trading resources and forging alliances, the AI would reciprocate. It’s much like planting seeds of friendship in a garden, nurturing them, and watching friendships blossom.

But tread on their toes, and these AI leaders could hold grudges. They’d react, strategize, and might even declare war. This was no simple, scripted enemy. The AI’s behavior was dynamic, adapting to the game’s ever-changing landscape.

Under the hood, Civilization utilized a rule-based system. However, it was much more advanced than its predecessors. Depending on various factors – from a player’s actions to the world’s current state – the AI would calculate the best move, much like a chess player contemplating the board.

In simpler terms, imagine teaching kids to play a sport. At first, they follow basic rules. But as they play more, they start developing strategies, reacting to opponents, and even forming teams. That’s how Civilization’s AI worked. It learned, adapted, and responded to the challenges thrown its way. Sid Meier’s Civilization use of AI influenced generations of strategy titles to come.

Racing Ahead: Behind the Wheel of Super Mario Kart (1992)

Speeding into 1992, Nintendo gifted us Super Mario Kart. More than just a fun racer, it packed an innovative AI under its hood.

Racing against AI competitors in Super Mario Kart felt different. These weren’t your run-of-the-mill opponents; they were personalities, each with unique traits and tactics. How did Nintendo achieve this? The secret lay in two components: pathfinding and rubberbanding. Let’s simplify these.

Pathfinding, at its core, is like giving a child a maze puzzle. There’s a start, an end, and a correct route to navigate. The game’s AI had a predefined optimal path for each track. If an opponent was knocked off course, the pathfinding would guide them back to their optimal route.

Then there’s rubberbanding, a clever trick to keep races close and engaging. Think of it like a game of tug-of-war. If you’re far ahead, the AI becomes more competitive. If you lag, they ease off the gas. This ensures thrilling, neck-and-neck races, keeping players on their toes.

Moreover, the AI made use of specific items based on their position in the race. This is similar to a board game where trailing players get a bonus to catch up, ensuring balance and excitement.

Super Mario Kart introduced an AI system that made racing unpredictable and entertaining. It’s a testament to how smart game design can elevate player experience, turning a simple race into a memorable gaming moment.

Galactic Strategy: Delving into the AI of StarCraft (1998)

1998 brought gamers to the edge of their seats with the release of StarCraft. Set in a distant galaxy, it was about outthinking opponents in real-time. Every unit, every move mattered. And who was often orchestrating the opposing forces? A brilliantly crafted AI.

Unlike many previous titles, StarCraft’s AI didn’t stick to a script. It observed and reacted. If a player built an army of flying units, the AI might counter with anti-air defenses. It’s similar to seeing rain clouds and grabbing an umbrella, anticipating the coming downpour.

The game was renowned for its three distinct factions: Terrans, Zerg, and Protoss. Each had unique units and strategies. Here’s where the AI’s beauty shone. It didn’t just have a single strategy; it had multiple, tailored to each faction’s strengths and weaknesses. It’s like a coach adjusting tactics depending on the players on the field.

Underneath, StarCraft employed a combination of rule-based systems and state machines. That means the AI relied on rules but also had a sense the environment (or state) and adjust accordingly, ensuring they don’t fall.

Multiplayer mode introduced another AI marvel. Here, the AI could team up with human players or other AI entities, coordinating attacks and sharing resources. StarCraft was challenging, adaptable, and immensely engaging.

Redefining Combat: Virtual Soldiers in Half-Life (1998)

StarCraft wasn’t the only impressive launch in 1998. We also got Half-Life.

Diving into Half-Life felt like stepping into a dynamic world. The enemies weren’t mindless drones. They had tactics, teamwork, and tenacity. The military personnel, in particular, showcased AI that made players double-take. These virtual soldiers weren’t solo fighters; they worked as cohesive squads. They flanked players, used grenades to force them out of cover, and retreated if they were outnumbered.

What powered this? A blend of scripted sequences and a reactive AI system. The game had certain set-pieces, like a player entering a new area. These are like scenes in a play. But within these scenes, the AI could improvise. If you hid behind a crate, they might circle around or toss a grenade.

This improvisation was based on decision trees. Imagine a flowchart guiding a decision-making process. If “A” happens, the AI might do “B” or “C,” depending on the situation. And with each decision, the AI would continue navigating the flowchart, determining its next move.

The result was an experience where no two combat encounters felt identical. The AI adapted, kept players guessing, and most importantly, created a sense of realism. It felt like battling thinking, strategizing foes, not just pixels on a screen.

Virtual Lives: AI Magic in The Sims (2000)

The new millennium brought us a groundbreaking simulation: The Sims. This wasn’t just a game; it was a digital slice of life.

In The Sims, players oversaw virtual people with emotions, desires, and daily routines. These “Sims” felt real, and their behaviors were steered by a multi-layered AI system.

Sims had needs like hunger, social interaction, and fun. And players had to address these needs to keep Sims happy.

The AI followed a priority system, a bit like a to-do list. A hungry Sim would prioritize eating over reading a book. If they felt lonely, they might call a friend before cleaning the house. This list of needs continually changed based on the Sim’s environment and emotions, creating dynamic gameplay.

Another noteworthy aspect was the game’s social interactions. Sims could form relationships, be it friendships, rivalries, or romantic partnerships. Some moves meshed well with other Sims, fostering a bond, while moves may lead to conflicts.

The AI in The Sims selected interactions based on personality traits and learned experiences. If two Sims shared interests, they’d likely get along. If past interactions were negative, a Sim might be hesitant to engage or even be outright hostile.

The Sims presented a virtual world pulsating with life, driven by an intricate AI system. It showcased how games could mirror reality, giving players a chance to play god in a sandbox of human emotions and experiences.

AI Techniques Used in Classic Games

Now that we know how the AI in a few classic games worked, let’s take a closer look at AI techniques that powered these titles.

Finite State Machines

Imagine you’re flipping through the pages of a choose-your-own-adventure book. Each decision you make sends you to a new page, presenting a new scenario. Finite State Machines, or FSMs for short, function in a somewhat similar manner.

Within the world of classic games, FSMs were the invisible forces, directing characters and enemies based on specific conditions and player actions. A game character could shift from one state, say ‘patrolling,’ to another like ‘investigating’ or ‘chasing,’ depending on what the player did.

But FSMs aren’t just about transitioning from one state to another. Within each state, there’s a set of actions the game character follows. In our guard example, while in the patrolling state, he might walk a specific route. During investigating, he could approach the source of the noise cautiously.

A standout example from classic games using FSMs is the ghost behavior in Pac-Man. Each ghost had states that determined if they were chasing Pac-Man, running away, or returning to their home corner. Their behaviors switched based on game conditions and player actions.

The beauty of FSMs lies in their simplicity. By defining states and the rules for transitioning between them, game developers could craft complex behaviors with a straightforward tool. This made FSMs a favored technique in earlier games where computational resources were limited.

FSMs acted like the directors of a movie, cueing characters when to change their roles. Through this mechanism, games from yesteryears managed to deliver engaging and dynamic experiences that still captivate players today.

Rule-based Systems

Many classic games implemented a system of “if-this-then-that” logic known as rule-based systems. For each possible scenario, there’s a direction or rule that dictates the game’s response. If the player does A, then the game will react with B. If the player chooses X, the game counters with Y.

Take the classic game SimCity as an example. Building a power plant near a residential zone? The rule-based system might decrease the happiness of the residents due to pollution. Place a park nearby instead? The happiness goes up.

This straightforward system allowed game developers to manage a vast array of possible player actions and game reactions. By defining a comprehensive list of rules, they ensured the game world reacted in logical and expected ways.

However, there’s a caveat. Rule-based systems can become cumbersome when the number of rules balloons. Imagine a cookbook with thousands of slightly varied recipes for a single dish. Finding the right one becomes challenging.

Despite this, rule-based systems served as the backbone for many strategy and simulation games in the past. Their clear and logical structure ensured that games felt fair, predictable, and yet endlessly engaging. Through these systems, classic games carved memories and experiences that we cherish and revisit even today.

Pathfinding and Navigation

Imagine being in a large maze. Your goal? Find the quickest route out. It sounds like a fun challenge, right? For game characters, this challenge is an everyday task, and it’s achieved using pathfinding and navigation techniques.

Pathfinding, in simple terms, is like a GPS for game characters. Just as we rely on maps to find the quickest route to a destination, game characters use algorithms to determine the most efficient path in their environment.

One popular method is the A* algorithm. Think of it like a friend guiding you through the maze. This friend keeps track of paths you’ve already taken and suggests the next best step based on what they know. They’re smart, efficient, and ensure you avoid dead ends.

Games like StarCraft and Age of Empires are great examples. Ever noticed how units in these games seem to “know” the best way around obstacles, avoiding lakes, mountains, or enemy structures? That’s pathfinding in action!

However, pathfinding isn’t just about finding the shortest route. It’s also about making characters move believably. After all, a knight wouldn’t swim across a river in full armor when there’s a bridge nearby!

Pathfinding and navigation breathe life into game worlds. They make characters seem aware of their surroundings and capable of making smart decisions, turning static scenes into dynamic, interactive playgrounds.

Emergent Behavior Systems

Emergent behavior isn’t about scripting specific actions for characters. Instead, it’s about setting foundational rules and letting characters interact. The beauty is in the surprises. Like watching birds flock together, each following simple rules, yet collectively creating a mesmerizing dance.

Games like SimCity or The Sims showcase this. Ever been surprised by your Sims’ antics? Maybe they started a kitchen fire or decided to swim in the middle of winter. These aren’t pre-planned stories. They emerge from the game’s underlying systems.

Emergent behavior is about the magic of “what if?”. By setting ground rules and allowing freedom within them, games can produce stories and events that even developers didn’t anticipate. It’s the heart of dynamic, responsive, and endlessly fascinating game worlds.

Influence on Modern Gaming

Many modern games wear their retro inspiration on their sleeves. They still use many of the same methods as classic games, including finite state machines, rule-based systems, pathfinding and navigation, and emergent behavior systems.

But games on average are so much larger today than they were in the 80s and 90s. Modern games, with their complex narratives and dynamic worlds, have larger bases to build upon.

And yet, despite these advancements, there’s a distinction between game AI and academic AI. Game AI often consists of heuristics designed for a good gameplay experience, whereas academic AI addresses broader fields like machine learning and decision-making based on arbitrary data input.

The line between game AI and academic AI is beginning to blur. Game developers are increasingly turning to academic AI techniques to enhance gameplay, and the academic community is showing growing interest in computer games.

Wrapping Up

Classic games laid the foundation for today’s game AI marvels. Just as bricks build towers, these classics crafted the milestones of modern game AI. It’s reminiscent of a relay race, where early games passed the baton to the next, pushing boundaries further.

The role of AI in games has transformed from a background artist to a lead performer, captivating audiences with lifelike behaviors. But what awaits on the horizon? As technology bounds forward, we might see AI not just as players but as co-creators, shaping stories alongside us.

With the legacy of the past, the future of gaming AI holds limitless possibilities, waiting to be explored.