• Advertisement

Formal name for a Weighted List AI

Recommended Posts

I remember seeing a name for this, but I can't find it anywhere now.

In one of my courses, I use a weighted list to decide the choices for an AI.

Basically, each AI class has 2 standard functions:  Value and Do.

[Value] returns a float, a percentage of how imperative it believes it is that it does this.  I.e. when your base is under attack, sending troops to defend returns a high value.

[Do] executes the AI.

Then an AI Manager gets the value for each AI choice, and chooses to do the one with the highest value.

I've seen a more formal name for this, but I don't recall what it was.

 

Share this post


Link to post
Share on other sites
Advertisement

Technically, when we talk about 'weighting' we usually mean some system that takes all the options into account, but factors the weights together to make a choice.

For example, if you could choose any of the options, but are more likely to choose the high-scoring ones, this is technically known as 'fitness proportional selection' or 'roulette wheel selection' in some circles, but is often just called 'weighted random': https://en.wikipedia.org/wiki/Fitness_proportionate_selection

But if you're just picking the highest-scoring option each time, that's not really a 'weight'. It's basically a score which yields a rank. The simple act of making a choice based on a score or ranking is known as a utility system, based on the game theory concept of utility as being an abstract score for how important or useful something is. Some utility systems will actually use roulette-wheel selection rather than just picking the top-scoring action.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Advertisement
  • Advertisement
  • Popular Tags

  • Advertisement
  • Popular Now

  • Similar Content

    • By francoisdiy
      So I wrote a programming language called C-Lesh to program games for my game maker Platformisis. It is a scripting language which tiles into the JavaScript game engine via a memory mapper using memory mapped I/O. Currently, I am porting the language as a standalone interpreter to be able to run on the PC and possibly other devices excluding the phone. The interpreter is being written in C++ so for those of you who are C++ fans you can see the different components implemented. Some background of the language and how to program in C-Lesh can be found here:

      http://www.codeloader.net/readme.html
      As I program this thing I will post code from different components and explain.
    • By GytisDev
      Hello,
      without going into any details I am looking for any articles or blogs or advice about city building and RTS games in general. I tried to search for these on my own, but would like to see your input also. I want to make a very simple version of a game like Banished or Kingdoms and Castles,  where I would be able to place like two types of buildings, make farms and cut trees for resources while controlling a single worker. I have some problem understanding how these games works in the back-end: how various data can be stored about the map and objects, how grids works, implementing work system (like a little cube (human) walks to a tree and cuts it) and so on. I am also pretty confident in my programming capabilities for such a game. Sorry if I make any mistakes, English is not my native language.
      Thank you in advance.
    • By LifeArtist
      Good Evening,
      I want to make a 2D game which involves displaying some debug information. Especially for collision, enemy sights and so on ...
      First of I was thinking about all those shapes which I need will need for debugging purposes: circles, rectangles, lines, polygons.
      I am really stucked right now because of the fundamental question:
      Where do I store my vertices positions for each line (object)? Currently I am not using a model matrix because I am using orthographic projection and set the final position within the VBO. That means that if I add a new line I would have to expand the "points" array and re-upload (recall glBufferData) it every time. The other method would be to use a model matrix and a fixed vbo for a line but it would be also messy to exactly create a line from (0,0) to (100,20) calculating the rotation and scale to make it fit.
      If I proceed with option 1 "updating the array each frame" I was thinking of having 4 draw calls every frame for the lines vao, polygons vao and so on. 
      In addition to that I am planning to use some sort of ECS based architecture. So the other question would be:
      Should I treat those debug objects as entities/components?
      For me it would make sense to treat them as entities but that's creates a new issue with the previous array approach because it would have for example a transform and render component. A special render component for debug objects (no texture etc) ... For me the transform component is also just a matrix but how would I then define a line?
      Treating them as components would'nt be a good idea in my eyes because then I would always need an entity. Well entity is just an id !? So maybe its a component?
      Regards,
      LifeArtist
    • By Descent
      Wow what a wild game by GalaXa Games Entertainment Interactive. Play now... it's really fun but IF you have epilepsy then don't play. It does not feature flashing pictures, but there is lots of animated stuff that might get ya. Anyway, 4 levels, 2 endings, insane action, BY INFERNAL. Please play it, right nao! Also , nice midi music composed by me is in the game.
       
      demons.rar
    • By Armantium
      Killing Floor 2 has the best dismemberment/gore system by far.
      No other game comes even close; how enemies react, segmented body parts depending where you shoot them, how dead bodies react, etc.
      Is there an easy-to-set up system, but with scaled down features, for the Unreal Engine 4, while still offering the same visceral physicality?
  • Advertisement