[AI Design] The basics

Past public reviews and discussions.
Message
Author
User avatar
PowerCrazy
Creative Contributor
Posts: 383
Joined: Fri Jun 27, 2003 2:35 am
Location: Texas

#16 Post by PowerCrazy » Sat Aug 02, 2003 9:21 am

Redman ;), I'd like to join the AI team sometime in the near future. My programming skillz have regressed to an infantile state, BUT I used to be good. I'm learning Python for a job I should get soon in Dallas, so i'd like it if we could use that. Not to mention its about A MILLION times easier than C++ to do the math calculations/functions for an AI. And as a bonus its inherently multiplatform.

Also
The attempt to conjure a self-learning AI for FreeOrion would be a nice project for a CS or EE graduate student. (or at very least a subset of the AI, for example growing an AI to handle resource production or diplomacy).
I'm currently an EE Junior at UTD, perhaps i could make it a project of mine :)
Aquitaine is my Hero.... ;)

User avatar
Impaler
Creative Contributor
Posts: 1060
Joined: Sun Jun 29, 2003 12:40 am
Location: Tucson, Arizona USA

#17 Post by Impaler » Sat Aug 02, 2003 3:38 pm

Most AI is efficient at perforuming TASKS such as colonize this planet or attack that system.

First we come up with the basic task sub routines. After they have been assembled and fine tuned we move onto functions that DESIDE BETWEEN DIFFERENT TASKS. Desiding between tasks and setting priorites is ware the real strategy is. This part of the AI can be almost entirly disconected from the task subroutines. Think of the subroutines as ministers and the desicion AI as the Emperor. This process parrallels the human though proccess, a player desides on one level to go to war and then performs many many smaller tasks (aka clicks) that are nessary to conduct that war such as design ships, move them to enemy star systems and glass planets. Just as the player first makes a high level desison like "go to war with the Darlocks" and then performs a lot of low level though (micro managment) to make that happen so too would the high level "imperial" AI make the big dessions and goals and then deligate the microing to "minister" AI's.

This Imperial Strategising AI computes what needs doing, sets GOALS and re-evaluates those goals based on changing conditions. The minister subroutines do not need to have such long term thinking. The output of the imperial AI could be sumarized something like this.

Activate Task subroutine L on planet 12 with high intensity
Supress to low intensity subroutine J on planets 2, 5, 8 and 16 to be replaced with subroutine Q
Terminate Subroutine A on planet 6
Intensifie subroutine Z on Player # 4

Translation

Rush build my Star Cruiser on planet Oberon
Reduce Reserch on these planets and incresse ship production
Cancel my Biodome on planet Tranus
Start stealing tecnology from the Evil Suberanian Amazonian Worms


So if we sut up the subroutines to recive input in the way humans actualy think and manage their empires. At first the high level managment AI would be extreamly skelatal with simple cause and effect relationships. Example "player #6 is 40% weaker then me" --> "make ships" --> "declare war on player #6" --> "attack player #6". We then design progressivly better desision making Imperial level AI with each version.
Fear is the Mind Killer - Frank Herbert -Dune

SithUK
Space Krill
Posts: 9
Joined: Mon Sep 22, 2003 10:08 pm

#18 Post by SithUK » Mon Sep 22, 2003 10:13 pm

Someone at the Apolyton forums worked out how the Civ3 AI decides which tech to work on next. It assigns points to a list of criteria and rates the tech on those criteria. Criteria are as varied as allowing trade over oceans to whether the tech allows an attacking unit (defence has different points attributed to it).

The thread can be found here:

http://apolyton.net/forums/showthread.p ... genumber=2

Civ3's AI programmer Soren replies to the thread.

Enjoy,

Sith

User avatar
Aquitaine
Lead Designer Emeritus
Posts: 761
Joined: Thu Jun 26, 2003 1:54 pm
Location: Austin, TX

#19 Post by Aquitaine » Wed Sep 24, 2003 1:36 pm

Interesting read. Thanks for the link!
Surprise and Terror! I am greeted by the smooth and hostile face of our old enemy, the Hootmans! No... the Huge-glands, no, I remember, the Hunams!

Locked