Development > Newbie Coding
Artificial Intelligence
H-Hour:
I believe the routing code only goes out a certain number of squares to keep its costs down. I can't speak about that.
Here's another stupid idea: let them explore. If an alien is unable to move closer to its target in one turn, have it pick a grid it can reach (not in the direction of its target) and walk to it. If possible, set a flag for the alien that tells it to move in that same direction a second turn. Then, after two turns, it can revert back to its normal routines. Maybe it will have a different outcome.
Alien movement doesn't necessarily have to be smart to seem smart. Chance and luck will make for some great encounters in the game, even if they happened because the player expected one behaviour but got something totally different.
DarkRain:
I know that pathing goes only to 33 TU max, I think, but I thought that routing info was available for the whole map, no need to measure the length in TU, the number of 'steeps' can be used instead, extremely costly anyway, the point is I think inside/outside is not as important if there's other way to make sure that "approaching" the intended target doesn't actually worsens the situation.
Duke:
--- Quote from: Sandro on May 25, 2012, 02:38:35 pm ---Writing those rules down: we shouldn't. It is not important when unit is inside, or outside.
--- End quote ---
1. Let's note that nobody managed to define inside/outside ;)
2. It's not too important, but it's just *one* small part of something I call 'situation awareness'. And that's important for a truly smart AI.
--- Quote from: Sandro on May 25, 2012, 02:38:35 pm ---Amount of cover is. You want to have a unit to have maximal angular range of opening in front, and have a minimal linear range of openings all around.
--- End quote ---
Plz elaborate on that. Especially the difference between angular and linear opening.
--- Quote from: Sandro on May 25, 2012, 02:38:35 pm ---That's the key to good tactical position.
--- End quote ---
Already falsified by Bayo :(
Duke:
--- Quote from: DarkRain on May 26, 2012, 12:27:44 am ---Duke, IIRC you're trying to help the poor aliens get out of their UFO, instead of crowding in some place inside and get slaughtered by through-wall weapons, right?
--- End quote ---
Yes and No. As we are talking about AI in general here, that 'harvester prob' is just a minor one.
--- Quote from: DarkRain on May 26, 2012, 12:27:44 am ---Forget about inside/outside -- even if both sides are outside (or inside for that matter) they could still be lured to the other side of a wall or some other large (and concave) obstacle --
--- End quote ---
True.
--- Quote from: DarkRain on May 26, 2012, 12:27:44 am ---... use the routing/pathing system to check how long they'd need to walk form their intended destination to the target position, and pick the one with the shortest route (yes, I know its probably extremely costly, stupid idea I said),
--- End quote ---
Not as stupid as you might think. At least I had a similar idea long since (or I'm at least as stupid as you ;) )
The idea (for one alien) was:
1. find the shortest path to the nearest target (can be multi-turn long !)
2. find the first place on that path where you can shoot at that target.
3. walk towards that place.
However, that would establish something very new to our AI: a multi-turn plan. And I hesitate to implement something like that without an (almost) complete design.
Checking *all* aliens to find the one who is the best to shoot the target is certainly overkill performancewise.
AND it would be the beginning of some even more complex thing: a team effort plan. See above.
--- Quote from: DarkRain on May 26, 2012, 12:27:44 am ---maybe have them prefer destinations from where they can shoot their target but cannot walk to it (they probably have some sort of cover).
--- End quote ---
That's probably the 'stupid' part of your idea ;)
Though feasible and easy for the human, for a computer/program it's just the *opposite* of the above algo:
Walk *away* from the target and find the nicest place to shoot from.
But it perfectly illustrates our dilemma: we have to take *everything* (here: weapon range) into account to make the right AI decision.
Duke:
--- Quote from: H-Hour on May 26, 2012, 01:00:05 am ---Alien movement doesn't necessarily have to be smart to seem smart. Chance and luck will make for some great encounters in the game, even if they happened because the player expected one behaviour but got something totally different.
--- End quote ---
True for simple games. But battlescape is like *chess* imho. Or probably even more complex.
And a pretend-to-be-smart algo will never cover 100% of the situations.
So at least smart players will recognize the patterns for those remaining %s and either file *bug reports* or exploit them.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version