Help a developer work
full time on 0 A.D.!
Help us by donating on a regular basis!

Wildfire Games Community Forums: AI Wishlist - Wildfire Games Community Forums

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

AI Wishlist

#1 User is offline   Zeusthor 

  • Group: WFG Retired
  • Posts: 469
  • Joined: 11-December 03

Posted 10 September 2005 - 07:07 AM

Hi, I think it's time we heard from you AI Scripters and AI hopefuls about what you want the AI language to do for YOU. It would be best to stay as general as possible and let us deal with specifics. So go wild and tell us what you want.
Jeffrey Tavares [ aka Zeusthor ]

Wildfire Games 0AD Scripter
Contact me: jeffrey@wildfiregames.com

Support Wildfire Games!


#2 User is offline   dark_blade 

  • Group: Community Newbie
  • Posts: 1
  • Joined: 12-September 05

Posted 12 September 2005 - 10:00 AM

I'll start us off. :S

I'd like an AI editor, with built-in debug tools, meaning you don't have to rely on notepad.

I'd also like ways of declaring and using variables.

It'd also be good to allow logical comparisons on game commodities, e.g:

food-amount 1 greater-than player-population 1 (where the 1 refers to the player whose food and population are being checked.

Also, error logging would be good, maybe saving to a error data file.

Another nice addition would be that of saving the AI at the same time as saving the game. This would mean that if you had variables defined etc. then their contents would be saved too, rather than having to check for a reload, then reassign the variable contents.

That's it for now, I'll keep thinking. B) :P

D_B
dark_blade

[size=1]Wildfire Games Community Member

#3 User is offline   Mabuse 

  • Group: WFG Retired
  • Posts: 46
  • Joined: 06-July 04

Posted 12 September 2005 - 01:44 PM

i want the AI to do all the things a Human player can do (garrison Buildings, repair Buildings, perform all the commands a Human player can asign to a unit, oput hem in Groups and give them a Formation and/or behave)

(and maybe more B) say a Human can define per strg+1(1-9) Groups - the CP can define a greater Amount of Groups. - and of course add Units to a group, remove them from a group - and so on)


I also want the computer be able to move Units around the Map to a certain Location (ok - thats already covered by "i want to CP can do all the Things a Human can do"),
and that the AI has the Tools to make this in a senseful way, so that the scripter (the scrpter script an AI for a RM-Map without knowing WHERE the AI start, WHERE the enemies are, where "the Hill" is and so on -

the scripter need to be able to determine all this -

ye more comfortable ye better of course -
getting the cooordinates is one thing, (and already helps a lot, also needed: counting objetcs in a certain Area (defined by a Point and a Radius))


of course this is very general -

i weould like to have an IDea how the AI-LAnguage will/could look like - what are the Basic Parts of it ?
Will it be "Rules" that go through each Pass, or whatever ?

#4 User is offline   Mabuse 

  • Group: WFG Retired
  • Posts: 46
  • Joined: 06-July 04

Posted 12 September 2005 - 01:48 PM

so i want a lot of individual control, but ONLY if i want to do it.

On the other HAnd it shoul dbe able to set a few Parameters to determine which Buildings should be repaired when damaged, by what Villagers, -

if towers should be garrisoned, by which UNits, in which Cases

and so on.

EDIT: I am surely willing to help on Design (and Test B) ), but not programming :S

#5 User is offline   Mabuse 

  • Group: WFG Retired
  • Posts: 46
  • Joined: 06-July 04

Posted 12 September 2005 - 01:54 PM

dark_blade, on Sep 12 2005, 10:00 AM, said:

Also, error logging would be good, maybe saving to a error data file.


Can you explain this a bit ? What do you mean with Errors ?

By now i would simply suggest that the AI will put out an error Message (which Line, Type) and don`t work at all.

#6 User is offline   Zeusthor 

  • Group: WFG Retired
  • Posts: 469
  • Joined: 11-December 03

Posted 12 September 2005 - 04:32 PM

The AI editor is probably a no. There are many text editors you could use and some allow you to define syntax highlighting with a configuration file. As for debugging, this would be implemented into the game engine itself. I wanted to put less emphasize on a script debugger and more emphasize on an informative error handler though. If the script can send you notices/warnings without failing unless it was a critical bug, you have a better chance of figuring out what's wrong. It would even help find logical bugs that aren't obvious, but you'd like to know about them. :S Logical operators would come in the form of >, <, >=, <=. There is no reason to create keywords for something like that as AOK did.

Could you try to explain what you mean by storing variables? What variables would you store?

I was thinking that the AI can maneuver by choosing a point based object placement. If your patrolling unit saw these miners, you could have the AI move somewhere within the range of that area. Counting objects is also an important way to consider your plan of action. I think your idea is implemented best just as you described it. Do you think choosing a point based on where friendly/enemy objects are would be effective enough?

I can't exactly show you how the AI will look because it's too early. I also don't want to move the conversation towards the actual language yet and just keep it as an ideas thread :P.

"so i want a lot of individual control, but ONLY if i want to do it." Don't we all? B). The plan is to use a constraint-based system which I won't explain in detail at this time which allows you to choose units depending on information about them such as "garrison 6 of the closest idle civilians to tower" or "garrison the 6 civilians to the closest tower". Things like building a tower near a resource by the gatherers themselves becomes possible with little effort. You know who you want to do your tasks, all we have to do is make sure you can pick them without keeping track of specific units.

About what he means when it comes to storing errors. There are more than 1 type of error. There is the error that prevents the script from running, an error that doesn't do what you thought it would, and errors that occured externally such as not enough system resources or couldn't load a needed file. So, you need to keep track of them all the most important being the errors that don't do what you thought it would. These logic errors are very hard to find when it comes to AI.
Jeffrey Tavares [ aka Zeusthor ]

Wildfire Games 0AD Scripter
Contact me: jeffrey@wildfiregames.com

Support Wildfire Games!


#7 User is offline   Mabuse 

  • Group: WFG Retired
  • Posts: 46
  • Joined: 06-July 04

Posted 13 September 2005 - 09:43 PM

Zeusthor, on Sep 12 2005, 04:32 PM, said:

Logical operators would come in the form of >, <, >=, <=. There is no reason to create keywords for something like that as AOK did.


AOK has also the ">, <, >=, <=" beside the Key-Words - and believe me, no (expierienced) Scripter use the Keywords B)

btw, these operators were not the point of his statement - he would like to be able to compare things with each other

Instead of making 100`s of Rules comparing the Values like this

players-population < 15
food-amount >= 15
...
players-population < 16
food-amount >= 16
...
players-population < 17
food-amount >= 17

instead

food-amount > players-population
(this is not cvorrect AOK-"Slang" but i guess you know what i mean

Zeusthor, on Sep 12 2005, 04:32 PM, said:

an error that doesn't do what you thought it would

the most important being the errors that don't do what you thought it would.
These logic errors are very hard to find when it comes to AI.


No need to chec these, the scripter has to search his script for logical errors -

how to determine what the Player want to do anyway -

if i ask

"enemy-unit < 13"

and i wanted

"enemy-unit > 13"

how to determine what i wanted to do ? Thats impossible - and anyway not needed

#8 User is offline   Vingauld 

  • PipPip
  • Group: Community Members
  • Posts: 136
  • Joined: 12-February 05

Posted 14 September 2005 - 06:03 PM

I would love to see unit emoition lik on Lord of the Rings BFME
Greed has poisoned men's souls, has barricaded the world with hate,
has goos-stepped us into misery and bloodshed.
We have developed speed, but we have shut ourselves in,
Machinery that gives abundance has left us in want.
Our knowledge has made us cynical, our cleverness hard and unkind.
We think to much and feel to little.
More than machinery, we need humanity,
more than cleverness, we need kindness and gentleness.

#9 User is offline   Zeusthor 

  • Group: WFG Retired
  • Posts: 469
  • Joined: 11-December 03

Posted 16 September 2005 - 02:45 AM

can you specify what you mean by unit emotion and how it would apply to a game like 0AD? If it's a consistent reaction, it would work in an RTS game, if it's a random reaction, it would ruin the balance.
Jeffrey Tavares [ aka Zeusthor ]

Wildfire Games 0AD Scripter
Contact me: jeffrey@wildfiregames.com

Support Wildfire Games!


#10 User is offline   Zeusthor 

  • Group: WFG Retired
  • Posts: 469
  • Joined: 11-December 03

Posted 16 September 2005 - 02:52 AM

btw, mabuse... thx for specifying that... yes you could compare functions with eachother directly.

"how to determine what i wanted to do ? Thats impossible - and anyway not needed"

To determine that, we could log the decisions and actions the AI made sorta like a movie script of what happened during a game. You could then use it to find things that you find wrong... like why did it go for so much wood if it needed to make cavalry type things B).
Jeffrey Tavares [ aka Zeusthor ]

Wildfire Games 0AD Scripter
Contact me: jeffrey@wildfiregames.com

Support Wildfire Games!


#11 User is offline   Mabuse 

  • Group: WFG Retired
  • Posts: 46
  • Joined: 06-July 04

Posted 02 October 2005 - 05:14 PM

ah, another Thing came to my Mind.

of course it is difficult to talk about something we not know how the scriptlanguage wil owrk finally or look like.

so i can only show what i mean in AOK-scripting (or something that is similar)

OK:

In AOK every Unit has a certain ID-Number.
You can ask
(unit-type-count archer < 4)
or
(unit-type-count 4 < 4);4 is ID of archer

then there are "-lines" that include all the Units that can be trained in this "-line" like Archer, Crossbow, Arbalest

and finally GROUP-Numbers that include ALL UNits that are "ranged foot soldiers" for example.

Now what i wanted to ask:

Is it perhaps possible to "store" several Values within one Variable for example with

(defgroup TROOPS 100, 22, 456, 238 ...)


And then i can ask
(unit-type-count TROOPS >= 30)

and create my own Group-ID (and decide which ID they should include) ? :(



EDIT:
hehe, but then again, i could also count all these manually and add them :)

Provided the language allow me to do this

#12 User is offline   DarkAngelBGE 

  • Group: WFG Retired
  • Posts: 7,686
  • Joined: 25-August 03

Posted 02 October 2005 - 07:09 PM

This sounds like a cool feature, Mabuse. I am sure we could do this. :)
Tim Koschuetzki [ aka DarkAngelBGE ]

Wildfire Games Community Administrator, Webmaster, Human Resources Manager
Contact me: tim@wildfiregames.com

My website: tim-koschuetzki.com

Recent work: PHP Design Patterns | PHP Coding Practices | Stop the Smoking! | My Services | My Blog

Support Wildfire Games!


#13 User is offline   Zeusthor 

  • Group: WFG Retired
  • Posts: 469
  • Joined: 11-December 03

Posted 03 October 2005 - 11:26 PM

Yes, this would be possible. Tim, could you get on MSN? I need someone who likes AI and doesn't mind boring details :).
Jeffrey Tavares [ aka Zeusthor ]

Wildfire Games 0AD Scripter
Contact me: jeffrey@wildfiregames.com

Support Wildfire Games!


#14 User is offline   Koalaface 

  • Group: Community Newbie
  • Posts: 1
  • Joined: 04-October 05

Posted 04 October 2005 - 05:22 AM

Speaking also from AOK perspective...

It seems apparent that AI's are more powerful when the basic framework is provided and the scripting community is able to develop itself. In AOK many commands/facts are used (effectively) in ways that the programmers may not have anticipated. Much control can be given and yet the scripting still be accessible to newcomers if levels of complexity are structured : a simple example - newcomers tell their army to attack - experienced scripters specify only land unit to attack...others specify archers only to attack etc..

Along these lines aok enables us to count how many archers are in your amy but does not enable to give specific commands to these. Instead the entire army must be addressed as a whole.

Directional commands would be great - eg. Attack closest enemy or attack the enemy my ally tells me to
- Build a tower at the front(north) limit of my town or at the west side etc.

Anyway.. an interesting project... well done !

This post has been edited by Koalaface: 05 October 2005 - 11:40 AM


#15 User is offline   DarkAngelBGE 

  • Group: WFG Retired
  • Posts: 7,686
  • Joined: 25-August 03

Posted 04 October 2005 - 10:09 PM

Jeffrey, my msn is currentl screwed up I have to reinstall it. Hang on a bit. I am on another comp now since my real one's mainboard died. Please send your msn contact via pm.
Tim Koschuetzki [ aka DarkAngelBGE ]

Wildfire Games Community Administrator, Webmaster, Human Resources Manager
Contact me: tim@wildfiregames.com

My website: tim-koschuetzki.com

Recent work: PHP Design Patterns | PHP Coding Practices | Stop the Smoking! | My Services | My Blog

Support Wildfire Games!


#16 User is offline   Mabuse 

  • Group: WFG Retired
  • Posts: 46
  • Joined: 06-July 04

Posted 08 November 2005 - 11:25 PM

Threat Assessment == Situation Assessment

from aiscripters forum
----------------------------------------------------
QUOTE (Mabuse @ Oct 19 2005, 01:09 PM)

to assess a threat the scripter does not need more to know than to count units of certain types within a certain area - nothing more.
-----------------------------------------------------



Btw, thats of course not all :)

we also would like to know which equipment (upgrades) the enemy units have, which time the enemy is in and so on.

in AOK we have thee things to determinate things about the nemy -

players-building-count
players-building-type-count
players-civ
players-civilian-population
players-current-age
players-current-age-time
players-military-population
players-population
players-score
players-stance
players-unit-count
players-unit-type-count

cc-players-building-count
cc-players-building-type-count
cc-players-unit-count
cc-players-unit-type-count

the ability to detect certain reerches of the enemy (the ones you could detect in some ways) could be also useful

in dimensions of 0ad - man more things would come up -



the next Step:
----------------
let us not call it "threat"-Assessment -

better descibe it as:

"Situation-Assessment"

then we need much more Informations:
(from AOK)

true
false

event-detected
taunt-detected
timer-triggered

cheats-enabled
death-match-game
difficulty
game-time
map-size
map-type
player-computer
player-human
player-in-game
player-resigned
player-valid
population-cap
regicide-game
starting-age
starting-resources
victory-condition

can-buy-commodity
can-sell-commodity
commodity-buying-price
commodity-selling-price

players-tribute
players-tribute-memory

can-build-gate-with-escrow
can-build-wall-with-escrow
can-build-with-escrow
can-research-with-escrow
can-spy-with-escrow
can-train-with-escrow
escrow-amount

attack-soldier-count
attack-boat-count
building-count
building-count-total
building-type-count
building-type-count-total
civilian-population
defend-soldier-count
defend-warboat-count
housing-headroom
idle-farm-count
military-population
population
population-headroom
soldier-count
unit-count
unit-count-total
unit-type-count
unit-type-count-total
warboat-count

dropsite-min-distance
food-amount
gold-amount
resource-found
sheep-and-forage-too-far
stone-amount
wood-amount

can-spy

building-available
can-afford-building
can-afford-complete-wall
can-afford-research
can-afford-unit
can-build
can-build-gate
can-build-wall
can-research
can-train
research-available
research-completed
unit-available
wall-completed-percentage
wall-invisible-percentage

civ-selected
current-age
current-age-time
current-score
doctrine
enemy-buildings-in-town
enemy-captured-relics
goal
player-number
random-number
shared-goal
stance-toward
strategic-number
town-under-attack


And of course many, many more related to all the new Commands we will get with 0ad.

I could now list up a bunch of things related to the things i suggested in several Threads (at aiscripters), but this would not make much sense, snce i don`t know if these commands are used, or whatever

Only my Comment so far, in AOK are a lot things missing

And we scripters can tell you something about.


I would like to see the first Suggestions how the Scripting Language will look like, which Commands it has and so on. If there are some so far.

#17 User is online   Wijitmaker 

  • Group: 0 A.D. Art Team
  • Posts: 9,231
  • Joined: 27-April 03

Posted 09 November 2005 - 07:14 AM

Cool, nice list! Thanks Mabuse :D

Zeus (Jeffrey) is out for a bit doing some webprogramming stuff, but I'm sure he'll catch this when he returns :)
Jason Bishop [ aka Wijitmaker ]

Wildfire Games CFO, retired artist
Contact me: jason@wildfiregames.com

Support Wildfire Games!!!

#18 User is offline   Mabuse 

  • Group: WFG Retired
  • Posts: 46
  • Joined: 06-July 04

Posted 09 November 2005 - 07:18 PM

and he will probably not as happy as ypu to see this, as it is just copied from AOK-AI. :D :)

however, these are the most basic things we need in every Case. all the other things will be important also.

because of the fact, that an [advanced] AI scripter invest much time to try to assess situations of many kinds - for example how to determinate that the enemy plays a certain strategy, or you look at a Test-Game and thnk if NOW the AI would do this and that it would be "so cool".

then you first have to assess the situation and try to describe it with the commands that were given to you.

so somthing like "threat-asessment" is somethng we do all the day.

So a good start would be the commnds we already have in AOK, but there will be a bunch more of them, that also dependsa lot on the "actions" an ai can execute.

so if i can move units to a certain pont, i must be able to determinate ist currnt position, determinate units withina certain are, determinate the current task a Unit has, determinte the stance a certain unit has, determinate which units (of which area) should join a certain group - all that position stuff for groups .

... etc etc etc ...

and much more - i could make a list with "fictional commands" - but i doubt that make much sense.

#19 User is offline   DarkAngelBGE 

  • Group: WFG Retired
  • Posts: 7,686
  • Joined: 25-August 03

Posted 11 November 2005 - 10:41 AM

Thanks Mabuse for the list, we jumped quite ahead with regards to Ai situtation assessment. I will post some details later for you. :)
Tim Koschuetzki [ aka DarkAngelBGE ]

Wildfire Games Community Administrator, Webmaster, Human Resources Manager
Contact me: tim@wildfiregames.com

My website: tim-koschuetzki.com

Recent work: PHP Design Patterns | PHP Coding Practices | Stop the Smoking! | My Services | My Blog

Support Wildfire Games!


#20 User is offline   Jawbax 

  • Pip
  • Group: Community Members
  • Posts: 30
  • Joined: 29-August 05

Posted 01 December 2005 - 09:32 PM

View PostDarkAngelBGE, on Nov 11 2005, 12:41 PM, said:

Thanks Mabuse for the list, we jumped quite ahead with regards to Ai situtation assessment. I will post some details later for you. ;)


So how was the AI situation assessment? :)

Share this topic:


  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users