TankUp: Describing the environment, part 2

What I’ve been pondering about the last few days is the question how to build a fingerprint of the environment of the AI Tank, once its sensor has taken down the data.

For now what the tank is interested in is the following:

  1. how many enemies are in teh vicinity (in sensor range)
  2. what is the total size of the enemies
  3. how big is the biggest enemy
  4. are there any layers in range
  5. are there any upgrades in range

Once I have the data I’d like to boil down that into a simgular piece of information that I can pass around and compare through time. Obviously an object would be… adequate. May be even a struct, as this is only a collection of data with no behaviour. However, I might still need a fingerprint I can fit into a single value type variable – Iwant to be able to easily compare it’s contents in t-0 and t=1 and say “something has changed, make a desicion about a possible change of behaviour”.

My usual go, given the fact that all the relevant information is expressed in integers, is to line them up one after another and read them as one larger ingeter, but that, for the moment, seems clunky. Is it?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.