Formular AI Question

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
Mabuse
Posts: 2239
Joined: November 6th, 2007, 1:38 pm

Formular AI Question

Post by Mabuse »

Hi !

i am completely new to Formuar AI, or better said im not even that.

now the questions:
is formular ai availabe in wesnoth 1.4.x ?


and if yes, i would simply like to make the ai (for a specific side) target a certain unit (which may change though) with utter priority

in best case, the ai-player would ALWAYS target the unit with utter priority which is nearest its leader. (except anoter unit is within direct reach, so coudl be attacked this turn)


as an alternative:
the unit that should be targeted would match the following filter:

[filter]
side=1,2,3,4,5
canrecruit=1
[filter_location]
radius=50
[filter]
side=6 (or7,8,9)
canrecruit=1
[/filter]
[/filter_location]
[filter]

so basically a (human)leader (p1-5) which is within a 50 tiles radius to that ai's leader. in this case p6.

i hope someone can give me a hint how to realize this in 1.4.x
Last edited by Mabuse on August 28th, 2008, 5:29 pm, edited 1 time in total.
The best bet is your own, good Taste.
Mabuse
Posts: 2239
Joined: November 6th, 2007, 1:38 pm

Re: Formular AI Question

Post by Mabuse »

btw, my request assumes somehow that formuly ai can be run as an addition to the default ai, is this right ?
The best bet is your own, good Taste.
AI
Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: Formular AI Question

Post by AI »

I believe not, you change ai_algorithm to formula_ai, then provide the (path of the) formula that will determine its behaviour.

Of course, I could be wrong.
Mabuse
Posts: 2239
Joined: November 6th, 2007, 1:38 pm

Re: Formular AI Question

Post by Mabuse »

ah well, i almost thought so.
(and in this context i would strongly suggest to make the formula ai as an "add" to the default available)

but i came to another solution for my problem anyway.
The best bet is your own, good Taste.
AI
Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: Formular AI Question

Post by AI »

It could make a useful addition: a "defer to default AI" command or the like.
User avatar
Iris
Site Administrator
Posts: 6798
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Formular AI Question

Post by Iris »

Mabuse wrote:is formular ai availabe in wesnoth 1.4.x ?
No.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Re: Formular AI Question

Post by Boucman »

Mabuse wrote:btw, my request assumes somehow that formuly ai can be run as an addition to the default ai, is this right ?
it is... it's just the other way round


you specify in your scenario that you use the formula AI and when all the stuff you want to do specifically for your scenario is done, you tell it "for everything else, use C++" and the C++ AI will move anything left and finish the turn

(you could also replace with a human player , if you wanted to)
Fight key loggers: write some perl using vim
Mabuse
Posts: 2239
Joined: November 6th, 2007, 1:38 pm

Re: Formular AI Question

Post by Mabuse »

well, that sounds good.
The best bet is your own, good Taste.
suokko
Inactive Developer
Posts: 65
Joined: June 1st, 2006, 4:13 pm

Re: Formular AI Question

Post by suokko »

Formula ai will slowly merged to default AI so that formula AI takes responsibility for parts that it is implement to work well.

This will also expose wml functionality to define formula ai using side/scenario wml.

First will be merged recruitment formula ai.
Post Reply