|
AI
Feb 21, 2009 13:24:27 GMT
Post by Julius CMXCIX on Feb 21, 2009 13:24:27 GMT
A couple of questions.
1. How would I get hold of an AI suitable for Risk style games? Like the one by Daftpanzer that King Bob used.
2. Is it possible for triggers to change the behaviour of an AI (eg by changing the strategic numbers) and if so, how?
|
|
|
AI
Feb 21, 2009 16:08:31 GMT
Post by Basse on Feb 21, 2009 16:08:31 GMT
The first one I don't know, but for the second one I have a solution I've tested and will be using in Gwyndlegard. Have the AI set a goal to 0 when the game starts, and at the point where you want the AI to change, have another computer player tribute some recourse, say 100 wood, to the AI. When the AI gets the tribute it should change the goal to 1. Also make sure all action you want to be activated when the change starts to require the goal to be set as 1. Example;
{defrule (true) => (set-goal 1 0) (disable-self) }
{defrule (goal 1 0) => (train spearman-line) }
{defrule (true) (goal 1 0) (players-tribute any-computer >= 99 wood) => (set-goal 1 1) (disable-self) }
{defrule (true) (goal 1 1) => (train militiaman-line) }
|
|
|
AI
Feb 21, 2009 16:50:58 GMT
Post by Julius CMXCIX on Feb 21, 2009 16:50:58 GMT
Okay, I've extracted the ai from King Bob's scenario. I recall that Daftpanzer said anyone could use it. It's quite complicated though and I don't fully understand it.
Thanks, Basse. Now I just have to work out how to apply your method. Do you have any idea of how can I easily check whether the change has taken place?
|
|
|
AI
Feb 21, 2009 18:52:20 GMT
Post by Morgoth on Feb 21, 2009 18:52:20 GMT
Isn't a regular aggressive AI good enough for a RISK game? Or do you want the troops to be more organized. Then use a RM AI, like Saiyan.
|
|
|
AI
Feb 21, 2009 20:37:12 GMT
Post by Basse on Feb 21, 2009 20:37:12 GMT
Change the third line of rules I gave to the following and it should work; {defrule (true) (goal 1 0) (players-tribute any-computer >= 99 wood) => (set-goal 1 1) (chat-to-player 1 "Why hello there Julius!") (disable-self) } Remember the disable-self part, or it'll keep sending you the chat throughout the rest of the game
|
|
|
AI
Feb 21, 2009 22:02:21 GMT
Post by Julius CMXCIX on Feb 21, 2009 22:02:21 GMT
It might be, but I get the feeling it won't attack in groups properly, which is what I want it to do.
What I would really like is to be able to tweak the AI so it will hunt for outposts, but not ignore nearby enemy troops. But I'm not sure that's even possible.
Basse: Thanks a lot, your method works like a charm. Strangely that tribute command didn't work for me, so I swapped it for a different condition.
|
|
|
AI
Feb 21, 2009 22:36:14 GMT
Post by Basse on Feb 21, 2009 22:36:14 GMT
No problem.
|
|