Stupid AI?

Other talk that doesn't fit elsewhere.
This is for General Discussion, not General chat.
Prailurus
New user
Posts: 5
Joined: 30 Jul 2008, 14:01

Stupid AI?

Post by Prailurus »

Specifically repair unit AI. No prioritizing on who needs healing first. Even if I have 8 repair guys and 5 tanks, they all tend to run around randomly, only occasionally healing each other, if I'm lucky.

I'm running the build that's in Ubuntu's repos. Would compiling from source help me? Or could it be the graphics are bogging down my computer and the CPU can't spend time on figuring out where the guys should run?

I've got a Sempron 3100+ (1.8Ghz) with ATI mobile x200 graphics card, no integrated graphics memory (shares the ram).
Wonder if someone else's comp, which is faster, has the same problem?
I'm out of the country so I can't get to my desktop :/

Gotta say I do enjoy Warzone though; thanks for the work on it guys.
Last edited by Prailurus on 30 Jul 2008, 15:57, edited 2 times in total.
User avatar
Idanwin
Greenhorn
Posts: 15
Joined: 23 Jul 2008, 12:48

Re: Stupid AI?

Post by Idanwin »

I have the same problem.
I always have to click on every unit that needs healing because otherwise the repair trucks are just turning around.
And also sometimes the truck that needs healing rolls away to let the repair truck get closer.
(I don't know with what version, I've got four different ones, but I think I had the first problem with all)

And is it normal that trucks need about 5 seconds before starting to move?

Idanwin
User avatar
lav_coyote25
Professional
Professional
Posts: 3434
Joined: 08 Aug 2006, 23:18

Re: Stupid AI?

Post by lav_coyote25 »

this is something that has been with warzone since the begining...but it seems to be more pronounced now... do units have a personal space that they need to keep maintained... ie : tanks need to have 2 spaces around them at all times? or what? this is one of those things that does appear now and again. no matter what the version.
Prailurus
New user
Posts: 5
Joined: 30 Jul 2008, 14:01

Re: Stupid AI?

Post by Prailurus »

This is really difficult to explain exactly what is going on. Best would be to play some campaign missions with healer units and just watch them. There's no rhyme or reason to it-- yesterday I told my lancers to go attack something and the healers went in the completely opposite direction and just sat in the corner of the screen.

Comparing how much better Starcraft's unit pathing is, I imagine a complete re-work would be in order. Of course, this would require someone versed in lots of CS theory-- maze solving and the like. I imagine there are algorithms for this sort of thing; which someone could write a masters on.
Prailurus
New user
Posts: 5
Joined: 30 Jul 2008, 14:01

Re: Stupid AI?

Post by Prailurus »

Ok so playing yesterday I sat with a notepad beside me and wrote down some thoughts on the pathing behavior, and some other things I noticed. These may have already been addressed in the newest betas, I'm running the beta currently in the Ubuntu Repos.

-Can't change or view keybindings during a game (from the menu)
-The intelligence reports force themselves on you. When you exit the intel report, all menus are collapsed (so if you were, say, working on loading units into a transport and were paging through your 4 pages of units, you lose where you were). A minor annoyance, would be nice if there would simply be an alert about new intel, that you could then click, so that viewing is at the user's leisure.
-Lots of versions of tanks and no easy way to see which kind of tank is which. Hard to pick out repair units vs. normal tanks.

As for the main topic of my post, the stupid AI, in relation to healers:
-They do not seem to prioritize-- they should be thinking "who needs healing the most in my vicinity?" Countless times they will go to guys at 70%+ health before going to guys at 20% health. Meanwhile while I'm waiting for them to finish healing the whole group, another attack comes and I lose the guys at 20%. Makes multi-tasking in the game hard-- you have to micro-manage the healers yourself if you want to get the healing done even remotely efficiently.
-Poor communication with units in the way. For instance, it seems the healer will simply say "move" to a unit in the way, but will not say which direction. Result is that the unit (or 2-3 units) in the way will move towards the unit that the healer is heading to. The target to be healed then sees guys bumping into him (or maybe they're telling him to move) and so he moves--usually in the same direction that the healer is moving in. So they end up playing a bit of tag. In cramped quarters (most of the maps it seems) this poor pathing creates lots of problems--particularly when the group is fighting. If he's on the front line, it pushes him further forward than the rest of the line, so he becomes the focus of more fire, and dies immediately.

Now I don't know how coding this sort of thing works exactly, but in trying to come up with solutions I was thinking something along the lines of a movement priority. The lower the number (unit's desire to get somewhere without going out of his way is more important), the more likely a unit is to stay his path, and the more likely other units are to get out of his way. This would function like an ambulance + cars at an intersection do. The ambulance has a low number, has higher priority, so in the event of a traffic jam, and no easy detour, he is less likely to try to detour, because it is more likely that the cars in the traffic jam will move out of his way for him. Would only come into effect if it would be faster than the ambulance taking a small detour around the cars to get to his point of interest-- IE, the entire road is full of cars, and it's better for the ambulance to go straight through them: so the cars forward and to the left of the ambulance try to pull off to the left side of the road, and the cars to the forward and right try to pull off to the right side of the road, making room for the ambulance to pass through the center. Otherwise, say there's only a group of 15 units/cars, and no restricting geography nearby, it's simpler on the whole for him to just go around this small group to the guy at the front, than it is to try to pass through the middle and make everybody move, to get to the guy at the front.

Also, units in general need to look at the big picture of how best to navigate somewhere. It seems like they only do a few permutations in a Forward FOV cone of about 40 degrees (FOV is Theta in the image linked below) for how best to get some place--
Image
If I've got a group of 20 tanks coming down this ramp going towards the red X, usually at least one or two tanks will get confused/stuck before the ramp ends. He will just sit there and turn about 20 degrees right, and then 20 degrees left, and then right again, not seeing that the way to get to where I told him and the rest of the group to go is to follow the green path.

Units trying to get somewhere should be "humble" about it and try to seek a path that causes the fewest other units to have to move. If I've got a unit at the back of a group, and I want him to go to red X--
Image
He won't see the fastest and easiest path (green), he'll conclude that making 20 units get out the way is better than just going around the whole group. He takes the turquoise path and jumbles up the whole group while he's at it, pushing some units forward, way in front of the rest of the group.
Kamaze
Regular
Regular
Posts: 1017
Joined: 30 Jul 2006, 15:23

Re: Stupid AI?

Post by Kamaze »

Per or Troman created a patch/addon for the last case. There should be something in this forum somewhere. But the CPU usage was very high.
We all have the same heaven, but not the same horizon.
Troman
Trained
Trained
Posts: 424
Joined: 12 Aug 2006, 15:40

Re: Stupid AI?

Post by Troman »

Indeed, Here.
Prailurus
New user
Posts: 5
Joined: 30 Jul 2008, 14:01

Re: Stupid AI?

Post by Prailurus »

Kamaze wrote:Per or Troman created a patch/addon for the last case. There should be something in this forum somewhere. But the CPU usage was very high.
Wonder how Blizzard/other companies pull it off. They've been doing it since Starcraft, Command and Conquer: Red Alert...as long as I can remember.

Anyways, it looks like his patch deals with threats...that's not what I'm talking about here.
elio
Regular
Regular
Posts: 508
Joined: 09 Jun 2007, 22:11

Re: Stupid AI?

Post by elio »

why not declare standing units also as "threat"?
Troman
Trained
Trained
Posts: 424
Joined: 12 Aug 2006, 15:40

Re: Stupid AI?

Post by Troman »

elio wrote:why not declare standing units also as "threat"?
Theoretically possible, but the problem is pathes are calculated statically now, they don't change once computed and if enemy units move your units with precalculated path will go around a palce where which has no threat.

Dynamic paths are a bit more complicated and generally need more CPU time. You can probably optimize it, but you need someone dedicated to this and with some pathfinding knowledge. ;)
coolkid
Trained
Trained
Posts: 233
Joined: 23 Jul 2008, 02:52
Location: Parsons, Kansas USA

Re: Stupid AI?

Post by coolkid »

really how much of a cpu increase is it maybe it could be off loaded to a different cpu core and if it isnt that high you could have as a option for single core users
the largest wz steam community http://steamcommunity.com/groups/wz2100 (all welcome to join help find matches find new relese and recruit new players)