Search found 1121 matches

by mattsc
November 15th, 2019, 3:19 pm
Forum: WML Workshop
Topic: Questions about some Micro AIs
Replies: 11
Views: 1052

Re: Questions about some Micro AIs

Sounds good. A couple more quick comments: About the static guardians, I will think about the idea to free them at some point. What is more, the leader could use in my opinion a leader_goto AI in order to force him to stay on his keep... If you really just want him to stay on the keep, you don't nee...
by mattsc
November 12th, 2019, 4:08 pm
Forum: WML Workshop
Topic: Questions about some Micro AIs
Replies: 11
Views: 1052

Re: Questions about some Micro AIs

* The 99 move cost on water hack. Could it be possible to achieve the same by a nicer way ? First, in my opinion that's not all that dirty a hack but a perfectly good method for achieving this. However, if you do not want to do it that way, this can also be achieved with a very minor change to the ...
by mattsc
November 11th, 2019, 5:06 pm
Forum: Lua Labs
Topic: Lua error: cannot find ai.move_full (but finds & calls other func in 'ai')
Replies: 8
Views: 1355

Re: Lua error: cannot find ai.move_full (but finds & calls other func in 'ai')

Just a couple additional comments on Celtic_Minstrel's last two post. First: yes, that's why the eval/exec separation is done that way. Once you are inside the execution function, it has to execute an action otherwise it gets blacklisted. That is primarily set up in this way to prevent an AI getting...
by mattsc
October 25th, 2019, 10:12 pm
Forum: Coder’s Corner
Topic: External AI control
Replies: 3
Views: 261

External AI control

The question has come up a few times whether it is possible to have an external mechanism (such as a machine learning framework) interact with Wesnoth without having to change the C++ code. In other words, is it possible to receive the game state from Wesnoth and pass a move back to it, which is the...
by mattsc
October 20th, 2019, 8:58 pm
Forum: WML Workshop
Topic: How to use the built in AI Scenarios
Replies: 4
Views: 156

Re: How to use the built in AI Scenarios

Those are all AI test scenarios that you start from the commandline. The first set are the Micro AI test scenarios and the wiki explains here how to start them. You can also start each of them individually, which is explained in the sections about the individual Micro AIs on the same page. The secon...
by mattsc
October 16th, 2019, 7:02 pm
Forum: WML Workshop
Topic: Questions about some Micro AIs
Replies: 11
Views: 1052

Re: Questions about a Micro AI: Wolves

Okay, if that's the moving behavior you like, that's good. I think we can also improve the efficiency of crossing the river by changing a couple of the parameters in the code. I'll see how hard it is to combine this with the attacks of the multi-pack wolves. Shouldn't be too bad, but until I try tha...
by mattsc
October 13th, 2019, 8:41 pm
Forum: WML Workshop
Topic: Questions about some Micro AIs
Replies: 11
Views: 1052

Re: Questions about a Micro AI: Wolves

I've had a first look at this and I am not sure that the Wolves MAI is the right AI to use here. It is set up to spread the "wolves" out in a line roughly perpendicular to the direction in which the target is located, and as a result, they don't make much progress toward the target. This seems parti...
by mattsc
October 11th, 2019, 4:39 pm
Forum: WML Workshop
Topic: Questions about some Micro AIs
Replies: 11
Views: 1052

Re: Questions about a Micro AI: Wolves

I think for the short term I should try to do that. The condition could be "all the members of the pack are in range of an unit of the player and none of them is in range of a trader". That would ensure that the pack has a chance to stay grouped. Actually, I am unsure how to do that in WML (test we...
by mattsc
October 7th, 2019, 8:18 pm
Forum: WML Workshop
Topic: Questions about some Micro AIs
Replies: 11
Views: 1052

Re: Questions about a Micro AI: Wolves

Hey nenau, Thanks for the feedback. It's good to see people using the Micro AIs and making suggestions for improvements. I looked at your replay and I see what you mean. Do you know if there is a way to reduce aggressivity towards a player in particular? Unfortunately, that's not possible. That's a ...
by mattsc
October 6th, 2019, 2:12 am
Forum: WML Workshop
Topic: Change control over side to AI and back mid turn
Replies: 9
Views: 335

Re: Change control over side to AI and back mid turn

I know you said that you'll probably not do it this way, but just for the record (in case somebody looks up this thread in the future) I'll add one thing: Celtic_Minstrel's method should work, but I'd probably do a minor variation on it: Instead of the candidate action in Step 3. returning a very lo...
by mattsc
September 24th, 2019, 6:59 pm
Forum: WML Workshop
Topic: AI behaviour query
Replies: 6
Views: 847

Re: AI behaviour query

Hi Spannerbag, just a couple more quick things: I kinda thought it was something to do with path finding because it didn't happen straight away but rather in the early teens (turn 13, 14 etc.). Once it happened, all subsequent spawned units at that location were also affected. The scenario begins wi...
by mattsc
September 23rd, 2019, 3:59 pm
Forum: WML Workshop
Topic: AI behaviour query
Replies: 6
Views: 847

Re: AI behaviour query

Hi, This does not sound like "standard" AI behavior, but like something else is going on. Unfortunately, without you posting a test case it is essentially impossible to tell what that might be, but I'll make two mostly random guesses anyway: 1. Do you maybe have first_time_only=no in the event that ...
by mattsc
August 28th, 2019, 7:45 pm
Forum: WML Workshop
Topic: [micro_ai] error: bad argument #1 to 'insert' (table expected, got nil)
Replies: 8
Views: 418

Re: [micro_ai] error: bad argument #1 to 'insert' (table expected, got nil)

Also, since the entire Micro AI is written in Lua, you could add a local, fixed version of the MAI to your campaign and use that. Then it becomes independent of the version a player uses. Might not be worth the effort though.
by mattsc
August 28th, 2019, 7:27 pm
Forum: WML Workshop
Topic: [avoid] puzzlement
Replies: 10
Views: 456

Re: [avoid] puzzlement

Hmm, I have used [avoid] tags multiple times and never noticed any significant or unusual delays. Would it be possible for you to send me a test case so that I can look into what's happening? (Feel free to do so by PM, so that it won't be a spoiler.) Sometimes there are relatively simple optimizatio...
by mattsc
August 27th, 2019, 1:53 pm
Forum: WML Workshop
Topic: [micro_ai] error: bad argument #1 to 'insert' (table expected, got nil)
Replies: 8
Views: 418

Re: [micro_ai] error: bad argument #1 to 'insert' (table expected, got nil)

Yes, that's it, and it is already fixed, but only from Wesnoth 1.14.6 on, while it looks like you're using 1.14.5.