Formal name for a Weighted List AI

Recommended Posts

hpdvs2    1017

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
Kylotan    9972

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
IADaveMark    3740

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

  • Similar Content

    • By Raptor42
      I'm looking to form a new game development team, mostly for training purposes.
      About me:
      I'm a student - Unity C# developer, who worked part-time in this industry for a couple of years already. I've been a lead developer in many "random collab groups" as well as a few companies. I specialize in creating 2D games for Android, but I'm looking forward to trying out new things - especially 3D development.
      Currently, I've got one Android game close to a release so I'd work for this team in my spare time. 
      About the project:
      I've been thinking about creating a simple tycoon-like simulation game for Android (and PC eventually), inspired by the Game Dev Story (initially released by Kairosoft in 1997) https://en.wikipedia.org/wiki/Game_Dev_Story 
      I haven't done much planning though, therefore I'm looking forward to hearing out your ideas.
      Right now, I've only created a test 3D scene using placeholder models and implemented a simple pathfinding system for me to play around with:
      I'm looking to work with people who are:
      - willing to take a position of a: 3D modeller/2D artist/Designer
      - not necessarily very experienced, but eager to learn and improve their skills
      - active - check in at least once a day
      If you'd like to apply for a different position which I didn't list here, you are welcome to contact me as well.
      While this project is created mostly for learning purposes, if we ever get to release it and generate any revenue - you will recieve a certain percentage of it.
      To Apply:
      Send an email to rk.softwaredev@gmail.com
      Introduce yourself and attach an example of your work (if you have any)
    • By MarcusAseth
      I was doing an experiment, code below:
      template<typename T> struct S { explicit S(T v) :val{ v } {}; T val; }; int main() { S<int> MyS('g'); cout << MyS.val << endl;//Output is 103 return 0; } Even though I am providing T with a type which is int, and I have an explicit constructor, why I have an implicit conversion from char to int? Shouldn't it see that T is int since I'm telling it so and thus give me error for constructing an S out of char?
    • By MarcusAseth
      I'm following the list of games a begginner should make suggested by Alpha_ProgDes and I'm about to start making Breakout, though this time I'll go the hardcore way with C++ & SDL instead of Unreal Engine. I'll figure out  how to write the classes and make it work, though I wanted to ask you guys about what I will need to make and how it should be organized, so that I have a clear roadmap that I can breeze trough step by step, without hitting any dead ends So this are my initial thoughts: ●I will need a "Timer" class which keeps track of ms since last frame ●I will need a "Game" class which has a Timer and takes care of initializing the SDL_Window and SDL_Renderer, also with a destructor that takes care to destroy them. ●I will need a "TextureManager" class which containst a map<string, Texture*> to which I can ask for a texture by its name from within other classes, so pretty much every Actor (taking unreal naming for semplicity here) need to include this "TextureManager". Also texture manager destructor takes care of destroying all the textures. ●I need a base Actor class which will contain member variables x,y centered pivot coordinates for the actor sprite, SDL_Rect for the sprite position/size and a Texture* for the sprite, also virtual draw() and virtual update() methods Well that all I can think for now, I don't have a very clear idea for how the input handling should be done, is just like a super giant switch inside the game loop, or it is like a class "InputManager" that keep track of which actor is interested in which key input and forward the inputs to the approriete actors or... mh... no idea really how it should be done So, whatever feedback or suggestion or "Structure Roadmap" you can present me to put me on the right tracks, is very welcome!   I only need knowledge of a reasonably correct structure and I will fill in the blanks  
    • By chiqo
      I've read Object Oriented Prograamming C++ 4th Edition. Did some exercises, honestly I'd say I covered 70% of this book. Mark some topics for reread later. then I'm thinking go with The C++ Programming Language [4th Edition] - Bjarne Stroustrup any suggestion will precied. 
      I don't have any programming experience. But I've play a lot of games... Here goes nothing... 
      I'm thinking make a game. (Looked up with unity engine seems like brain surgery to me. )At the beginning my game will have only one big-ass map. 4 type of NPC's 
      Get quests from NPC's, get your reward after finish. 
      Buy metarials (equipment, healt potions etc)
      TeleportGate NPC's 
      The goal is finish quests, get stronger, learn skills, collect seven unique diamonds among the quests and face with evil creature. 
      This is already very complex for me, but I couldnt help myself to think deeper and deeper.Then I thought why not MMORPG... then things get messy. I am keep overthinking, I cant concentrated now. 
      These are what I am thinking on the server side; 
      there will be 4 units. 
      NPC's with static locations (Stroge, Trade, Quests, Gates etc) 
      NPC's with dynamic locations - Monsters
      User Database
      Pool (deal with everything)
      NPC's and monsters have pre-set locations, behaviors, shortly they will have their routine. for example lets name four monsters (scylla(FBCD),pyhton(FBCE), satir(FBCF), echidna(FBD0)) also creatures will have locations and health values. I dont want to go further with details. so pool unit has all informations and authority decent manupulations for NPC's and Monsters and get informations logged player via database. when player logged, pool will define a dynamic number as long as player logged and generate viewport for player and send package. a character has charid, charname, charloc(x,y,z), charstatus(idle,walking,flying,attacking etc), charhp(max,current), chararmor, charmp(current,max), charAttackPower, charDefence, charExp(current,max) there would be more informations or less... now 1st player in the pool. . when another player logged assume both player close each other... 2nd player will get viewport including 1st player appereance too.1st player only get 2nd player's appereance.  my point is only send or prepare necessarry packages. lets assume all informations belong a character 4 bytes each. and you send/receive 10 packages per sec... 520bytes per sec for a character with all informations(I know networking doesnt work like this. my point is this is tiny). I still think thats manageable.
      As you can see English is not my main language I hope you get what I meant. this MMORPG idea like a virus(not software virus :)) taking control of my mind. I did some research about MMORPG advanced users says stay away. security issues details details bugs etc its hardcore I understand that. but still... I've desire to learn game programming, please put me right direction. 
    • By MarcusAseth
      I mean, I realize that it does so much for me, collisions and physics to mention the probably most obvious things, that even though I am a begginner, I don't really need to learn those now...and this might be a really bad thing.
      On the other hand, it gets out of the way the majority of the stuff that would stump a begginner trying to create a very simple game, so that even a begginner has a chance to create a simple game and see/understand better how everything interact with each other, and that's is a very good learning opportunity to improve because it ease the learning curve of what goes into a game.
      What's your opinion on this?
      What "stance" do you think a begginner should have regarding this fancy engines? 
      Also do you think that my fear of a "learning potential" being cripple by it is an actual thing? I mean, should I really worry about it?
  • Popular Now