I'm working on a new AI, but I need help with something
Moderator: Forum Moderators
-
- Posts: 873
- Joined: July 4th, 2004, 9:14 pm
- Location: My imagination
- Contact:
I'm working on a new AI, but I need help with something
How can I basically say:
"Suppose I make this move. Then where can the enemies go?"
so that I can see whether making the move would break my zone of control, for example.
"Suppose I make this move. Then where can the enemies go?"
so that I can see whether making the move would break my zone of control, for example.
Play a Silver Mage in the Wesvoid campaign.
Re: I'm working on a new AI, but I need help with something
Make a copy of the units map, modify it as appropriate, and then call the pathfinder, passing in the copy of the units map.Invisible Philosopher wrote:How can I basically say:
"Suppose I make this move. Then where can the enemies go?"
so that I can see whether making the move would break my zone of control, for example.
To do this kind of thing alot though, you'll have to come up with something more efficient.
David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Is the AI trying to protect a specific unit or maximize ZOC chains?
edit: or minimize exposure?
edit: or minimize exposure?
Hope springs eternal.
Wesnoth acronym guide.
Wesnoth acronym guide.
-
- Posts: 873
- Joined: July 4th, 2004, 9:14 pm
- Location: My imagination
- Contact:
I haven't quite decided what it'll do there. The idea is a goal-based AI; I have no idea how good it'll be until I try playing it, but it's nowhere near a usable state yet. It will have different values for protecting different units. I'm trying to make it extensible by WML (assign almost any sort of goal, and actually tell it about opportunities like freeing the mermen instead of saying "Go there, believe me, it's good for you", so that it can make more intelligent decisions on that sort of thing), and of course I'll try to give it a decent chance at tactical issues, though of course it won't be nearly as refined as the current AI at first. Assuming I actually finish it. I'm taking advice from the book AI Game Programming Wisdom, especially Chapter 7.5, "A Flexible Goal-Based Planning Architecture". Unfortunately it mostly assumes that each agent has a separate mind, which isn't quite applicable to a good Wesnoth AI. I'm mostly creating it as I go, using my intuition to decide what would make it smarter, and not too slow - while it might be good to check every possible combination of moves the AI can make for how good it is, it would take *way* too long. Of course for most things I don't know how long they'd take, and it's best to save optimizations for later, and I don't even have any kind of sense how long pathfinding takes with the new A* implementation.scott wrote:Is the AI trying to protect a specific unit or maximize ZOC chains?
edit: or minimize exposure?
Play a Silver Mage in the Wesvoid campaign.
-
- Posts: 873
- Joined: July 4th, 2004, 9:14 pm
- Location: My imagination
- Contact:
Specific lookahead of some sorts is way too slow. I think when it isn't in range of enemies it'll just take a general estimate of their power and position. Which is similar to what I do when I play -- I'm modelling the AI after myself.Kjara wrote:Are you attempting to make the AI have any sort of look ahead, or just worried about that turn, and the opponents following turn at this point?
Play a Silver Mage in the Wesvoid campaign.