Logo

Sistance's EXPLODE!
AI - rule of thumb / an alternate strategy


Diese Seite auf Deutsch

After I identified depth-first search as too slow and breadth-first search as too memory consuming, I decided to invent and test an AI type that doesn't bear on forecasting. In scope of computer chess these strategies are called A and B strategy.
In general we can use further optimizations in our previous AI methods (A strategy). But first I wanted to test all three variants before I spend much time in one single AI type.

The concept of an AI essentially bears on the possibility to rate all possible moves and select one of the better ones. A human player is forecasting moves as well, but usually she is searching for patterns, she is familiar with and knows of their advantages and disadvantages. The considerations of a human player aren't always obvious at first sight. But you can soon discover some of their "invisible" rules they use while "staring at the board", if you ask some questions.

I used this technique to develop the AI I describe in this chapter.
First I played the game several times to find situations I asses to be interesting in a tactical kind of view. Most often I first found such situations when a player can conquer fields that belong to the opponent. There is a direct confrontation that has to be rated.
If you don't want to rate the whole board you have to examine smaller parts of the board separate. On a board with just 5 * 5 single fields you have almost no possibilities to divide further. So I soon realized that examining single fields of the board could lead to a faster and better solution.
In contrast to chess every own and every opponent's field has the same tactical value. Each field can (and must) be modified by its position and its field value. IE an own field with a value of 5 that can conquer enemy fields, has a higher tactical value than an own field with a field value of 3 which is threatened by an enemy field with a value of 5.

At last I tried to assign each field to a certain category and identify the field that would grant me the biggest advantage or the least disadvantage if I upgrade it.

a first classification

  • If all neighbours of a field are other own fields the field is an outback field.
  • If a field is not an outback field, are any neighbours fields that belong to the opponent? A field that is no outback field and that has no opponent fields in range is a settler field, because it can conquer free fields but doesn't threaten opponent fields (or is threatened by them).
  • Fields that are neither outback fields nor settler fields, necessarily have fields in range that belong to the opponent. Such fields have to be rated in a far more complex kind than the previous two kinds of fields, because they threaten opponent fields or are threatened by them. I describe the further categorization of such borderland fields in the next chapter.

borderland fields

This AI is only rating situations in the AI's turn. So we implicit consider this additional condition.
  • Fields with a value of 5 are very interesting, because they directly and always threaten opponent fields. An own 5 value field that threatens an enemy 5 value field is called essential conquerer. Such fields have to attack immediately because if they do not, the opponent could do this in her own following turn: a 5 value field can conquer all nearby fields. I found only a very few number of situations where you should not use such a constellation to attack the enemy. (And rating such situations are far beyond the goals of a basic AI.)
  • Own borderland fields, that threaten enemy borderland fields, but are no essential conquerers, are just conquerers. If we upgrade them more and more (if they aren't 5 value fields yet), they will be able to attack opponent areas. Threatening an opponent field implies that every opponent field has a lower field value than the rated field itself. In general we have no need to upgrade such a field immediately, because the neighbouring opponent fields (usually!) cannot get a higher field value than this field already has. So the next category needs far more attention.
  • Borderland fields that aren't threatened yet but lay next to opponent fields with the same field value, are called potential conquerers. If you upgrade their field value, you will get a conquerer. The opponent can only upgrade one neighbour to get the same field value but not a higher value. As previously said: usually - advanced strategies allow such tactics.
    But if you do not upgrade the field value the enemy can upgrade her own best field next to this field to get a conquerer (and your own field is threatened).
    It is obvious that it is far more important to check the list of potential conquerers than to check the list of conquerers, because the latter fields already represent a real advantage, the former fields don't.
  • Fields that have a lesser value than the highest (not threatened) neighbouring field of the opponent, are theatened themselves. They are called casualty fields, because they cannot defend themself against an opponent attack. To upgrade them most often means no advantage, except if you create a so called 5554 setup.

outback fields

In the first moment it seems far less interesting to further sub-divide outback fields. But this isn't true at all. Outback fields often have a variable but great tactical benefit. Sometimes they can become borderland fields really fast or are needed as a standby for unwanted moves.

Especially the 5554 setup often uses (and needs) outback fields, but more trivial setups need such fields for special tasks, too.

Example:
An opponent field is threatening an own borderland field and is able to conquer it. The borderland field is a casualty field after all. But the outback field behind can secure this field if it has a higher value than the own casualty field.

rating

We can isolate the list of interesting moves relatively easy if we rate by category. 5 value fields that lay next to opponent 5 value fields are regularly the most interesting moves, because you can conquer large areas - or loose them if you present them to your opponent.
Potential conquerers also have a high ranking, because you can get a real advantage out of a potential advantage - or you can give the opponent this advantage if you do not upgrade your field.
Conquering free area is also a big advantage because you get possibilities to make moves without destroying or disturbing well planned tactically beneficial states.

 Impressum