# Ladybug Video Game, Optimal Strategy

The goal of the Lady Bug (arcade game) (1981) is to go thru the maze and eat up all the dots and other special things. Those green walls you can push thru, they act as turnstile gates.

It is quite fascinating to play this. One key in this game is by pushing the gates and thus changing the shape of the maze, to escape the pursuit. Like, running towards a gate and all of a sudden, flip, and the chasers can't get to you. The chaser bugs run faster than you, so exploiting the gates is essential.

## Optimal Strategy: Create Deadends

You want to set the gates to create as much dead-ends as possible.

Above, the gates on the left are in their default positions. The gates on the right sides are positioned optimally for the ladybug. See that there's a enclosure where the ladybug is at. In order to get to the ladybug, the beetles have to go all the way from the bottom, and enter from the right. So, it makes their approaching very obvious. Once they are near, just flip the gate and the chaser will have to go all the way back out to get you.

## To Max Score

Here's the points.

- Flower (the dots): 10 points (20, 30, or 50 points with appropriate multiplier)
- Blue letter/heart: 100 points (200, 300, or 500 points with appropriate multiplier)
- Yellow letter/heart: 300 points (600, 900, or 1500 points with appropriate multiplier)
- Red letter/heart: 800 points (1600, 2400, or 4000 points with appropriate multiplier)
- Vegetable: Starts at 1000 points, increases by 500 with each level to a maximum of 9500 points on level 18. Beyond this level, the vegetable's appearance (horseradish) and point value remain fixed.

To max score:

- First, eat all the hearts when they are blue.
- Eat the letters for E X T R A, when they are yellow. (if you already have it, then eat them when they are red.) Fill EXTRA gives you a extra life.
- Eat the letters for S P E C I A L, when they are red. Fill SPECIAL gives you a free game.
- Eat the Vegetable. When all bugs came out, there will be a veggie. Afterwards, when one of them die, there will be a veggie.

## Interesting Math: Maze Design

After you've been playing this game for a while, the math of game starts to get to you. For example, i've played this game on and off for years, and have developed certain gate positions so that it forms enclosures and maximize the path the chasers have to go thru. Once they come, you flip a gate and you are on the other side, and then they have to go all the way back to get you. (but of course, there are 4 of them)

Then, one starts to think about the maze design itself. Because, in this game the maze is always the same, so there's not much variations to think about on the above problem. It would be more interesting, if the maze varies on different levels. Then, one can think about the problems of optimizing gate states for each maze. And also, ultimately this leads one to think about the designs of the maze itself. That is, design a maze with these gates so that, it maximizes or minimizes the problem of finding the optimal gate states….

One simple maze design would be to have gates on a regular grid, that is, no fixed walls, and all walls are gates. This actually gets one into other things to think about… since for example, one wants to avoid having the door overlaying on each other… but anyway, if the gates are on a regular grid, than it gives a lot power to the ladybug. Ok, i guess our first principle would be: in general, the more gates, the more easy is the game. Suppose then we have a maze with just a couple of gates…

I was a teen during the golden age of arcade games (1980s and early 1990s), and today they are all available free. (See: MAME) There's a lot nostalgia. Back then, you have to drop in coins to play, and as a teen you don't have much, but as a teen you are rather very much addicted to it. And now, am reaching my 40s, and computers have become hundreds of times speedier, and video games have also grown many directions including artificial intelligence complexity, 3D games, and massively networked universes… but now these old, first-generation video games, thousands of them, are all freely available. They are the simplest games, however, many of them exhibit fascinating problems of math.

See also: Tron Lightcycle Optimal Strategy .

back to Maze and Math in Video Games

If you have a question, put $5 at patreon and message me.