FreeOrion

Forums for the FreeOrion project
It is currently Mon Dec 11, 2017 7:49 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: AI Personality Archtypes
PostPosted: Tue Jun 09, 2009 3:16 pm 
Offline
Space Floater
User avatar

Joined: Mon Jun 08, 2009 5:27 am
Posts: 16
Geoff told me to say this here.

AI needs to be done. Using Personality Archtypes is how things were done before, and its how I propose we do them now.

Personality is generated or chosen if an interface is built for it. Personality Is based on 2 basic parts for the time being, Attitude and Policy. Attitude is the nature, Policy is the demeanor. Some species may have restricted or preferred values.


Attitude controls how an entity does things.
Some Attitudes are:
  • Aggressive - whatever it does, it does with force
  • Passive - it does what causes least impact
  • Assertive - maintains its peoples position, no matter what
  • Sly - does things in manner in which it is hard to see the overall goals
  • Greedy - tries to get the most
  • Benevolent - helps others
  • Destructive - wants to destroy
  • Chaotic - random
  • Friendly - helpful
  • Secretive - hides away from others
  • Zealous - absolutely follows its principles
  • Cooperative - works with
  • Competitive - works against
  • Controlling - tries to influence what is happening all the time
  • Seductive/Alluring - seems to always offer something, just out of reach
  • Confident - feels its doing the right thing
  • Careful - makes sure whatever it does wont harm its people
  • Paranoid - think others are trying to destroy it


Policy determines what an entity does.
  • Expansionist - goes after worlds
  • Collector - tries to get things, ships, technologies, buildings, tries to get one of each.
  • Explorer - visits lots of planets
  • Merchant - wants to do business
  • Crusader - follows a path, destroying those against it, helping those with it
  • Builder - builds stuff, industrious
  • Researcher - seeks knowledge
  • Diplomat - orchestrates meetings and procedures with others
  • Conversionist/Assimilator - tries to convert you to their culture
  • Tyrant - rules with fear
  • Warrior - strong military, fights with honor if you do
  • Defender - strong borders, expands only to support stable growth.

These are by no means an exhaustive list. Most likely 3-4 of each will be picked. Using basic archtypes, its is easy to go through a list of choices, like what to research, or what to focus on, easily. It is just a matter of getting the information about the environment, and going through a list of choices based on the archtype, then issuing the calls to perform the indicated actions.

I will start blocking out some basic examples with a subset shortly. Input is appreciated, especially from those with understanding of the Python API.


On a given turn, an AI player, 'AI', has to do a series of tasks to play, the same as any other player. Just like any other program, it is going to perform basic program logic, get input, perform calculations, give output. AI will be no different.
when you break it down to basics, you get a simple system of tasks. ed* Geoff has shown me the existing AI files, thanks Geoff.
Here are some questions the ai might ask on its turn to decide what to do.
am I at war ?
what is the status of each of my planets?
how far away is the enemy/ other players?
are they hostile?
is there anything else that requires attention ?
did I finish any research ? what became available?
examine fleet, do I need a new ship ? what kind ?
examine empire, do I need a new planet ?

do I shift focus on the current planet? what do I shift it to ?
are there any long term goals I m perusing?
evaluate risk benefit of attacking other players
evaluate security of empire

do combat
shift focus on planets
give fleet orders
queue or shift focus of research
queue production


-naturally somethings are more simple than others, 'evaluate empire security' is going to be long and complicated Im sure. Its the differences that make the game interesting. Ultimately, every empire wants to know every tech, it is personality, mood, style, or whatever you choose to call it that determines what you learn First. Many of those questions get different answers based on the kind of AI player that is created. Im going to select a few basic 'personalities' to start making notes on that template, things that would swing those decisions one way or another.

I did read some of the previous threads on AI, and I am wanting to really simplify AI at this point. More complex structures, like genetics and learning can be applied later. I saw that personality is to be separate from AI, and I agree that an empires 'leader' should be separate, but that the AI player should have some form of mood to keep it from being predictable.

I am very open to suggestion. At this point, I am simply trying to get a utilitarian AI, that can take a complete turn, even if not very strategic or interesting. I will then start adding priorities, and themes to the script, and try to get some basic archtypes built.

I am thinking of using Aggressive, Passive, and Assertive, and Expansionist, Defender, and Tyrant/Destroyer. It will take time to get even one of those, and for now, my goal is just a neutral, responsible, generic AI player.


from irc:
a bunch of conditions make certain specifics happen, others alter values, that when they are within certain ranges, make other conditions be true or false, etc
priority ai looks promising
ike, in here, a tyrant would lower food production to the point of killing people, to produce ships to win a battle
a defender would not
this is a pretty important file, a lot could be done in here
basic preference could be done by giving a priority a modifier, multiplying it by 1.14 or such, so unless another was pressing, it would chose that more often
kroddnoMobil> please post that "brainstorming" at the forum

this value created based on many situational variables, allowing the ai to adapt.


knowing when to switch between the course of action, to sometimes build ships, and other factories and research, those conditionals, it should try different things, it should make mistakes too
from the start of the game, is the ai trying to build a lot of ships and outnumber you en masse, or is it building a few ultra tech ships that are light years beyond you in tech ? this isnt just racial bonuses, its perspective of the player rigt
ai needs to look around, see if it is located next to a slew of mineral rich planets, or if its on top of an ancient ruin
lots of conditionals, that should all factor into a set of weighted values, similar to the priorites, sets of steps it can take to get certain advantages and techs itt tries to do in order, like if I go through all the steps on this list, I get Ion cannons, I need this many research to get ion cannons, where is a world I can make a research planet
is the ai in this game even paying attention to reserch, or ist it just getting them one set of each branch at a time, and trying to just get as many planets as possible early, so it has high production mid game
you cannot do everything in the first 8 turns, you have to chose something, then something else for several turns after that
you should be able to bribe some ais, into servitude, but not others
not races, instances of the ai
like, if you have four ai players, in a big 100 star 4arm spiral, its going to come down a lot to luck, if they all do the same thing
each instance, should favor certain conditions, and seek them
instead of having a bunch of different set strategies, it creates them from a pool, based on not just race, but environment, and what other players have done/are doing
maybe one ai tries to build lots of ships, another is trying to get lots of tech, the other two are teaming up
in the next game they are fighting
mood is perhaps a good choice, since it should change over time
but even beyond how its acting at any given time there should be some cohesive pattern to its efforts in that game
it tried to win by ______, it acted _______
was it a friendly Psion that tried to out vote me, or a mean Psion that tried to enslave me ?
races can be played different ways
Im going to have to make lists of what techs can be researched in certain amounts of turns, to see what quick research strategies there are, what weapons can be gotten to in a short amount of time, things like that


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: AhrefsBot and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group