# Future of robots - Hostile AI Vehicles

**URL:** <https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041>\
**Category:** The Bunker\
**Created:** [November 28, 2016, 11:58pm UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041 "2016-11-28T23:58:57Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wally-kun](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/wally-kun/32/375_2.png) [@Wally-kun](https://discourse.cataclysmdda.org/u/Wally-kun)\
**Post date:** [November 28, 2016, 11:58pm UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/1 "2016-11-28T23:58:57Z")

</div>

Basically, tank drones are tanks. However, they’re 1 tile large. Cars are…many? Many tiles large.

Are we someday going to have to-scale hostile vehicle units like tank drones and cop car drones?

---

<div class="post-metadata">

**Author:** ![Mr\_Moustache](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/mr_moustache/32/582_2.png) [@Mr\_Moustache](https://discourse.cataclysmdda.org/u/Mr_Moustache)\
**Post date:** [November 29, 2016, 12:49am UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/2 "2016-11-29T00:49:23Z")

</div>

That would be amazing, or amazingly deadly. Probably the latter. But yeah, you see a lot of automated street cleaners, but they don’t seem to be very automated at the moment. In that I mean that they just sit there, dead. It would be cool to see them roaming the streets sweepig up rubble and dead zombies or something like that.

---

<div class="post-metadata">

**Author:** ![Hibou](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/hibou/32/1330_2.png) [@Hibou](https://discourse.cataclysmdda.org/u/Hibou)\
**Post date:** [November 29, 2016, 7:27am UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/3 "2016-11-29T07:27:37Z")

</div>

If there was someone out there willing to take on the monstrous task of programming an AI capable of controlling a multi-tile body, and then getting it to actually drive as if it were on four wheels, or treads, or whatever, then this would be possible and make a very, very nice addition to the game as a whole.

---

<div class="post-metadata">

**Author:** ![CK\_Kirbi](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/ck_kirbi/32/584_2.png) [@CK\_Kirbi](https://discourse.cataclysmdda.org/u/CK_Kirbi)\
**Post date:** [November 29, 2016, 10:37am UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/4 "2016-11-29T10:37:35Z")

</div>

That would all be pretty awesome. Hell, with such an AI, you could probably implement autonomous driving for survivors and bandits. Minefields and military checkpoints on roads would become a lot messier. =D

---

<div class="post-metadata">

**Author:** ![DeclanFrost](https://avatars.discourse-cdn.com/v4/letter/d/e5b9ba/32.png) [@DeclanFrost](https://discourse.cataclysmdda.org/u/DeclanFrost)\
**Post date:** [November 29, 2016, 1:01pm UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/5 "2016-11-29T13:01:48Z")

</div>

High speed chases while dodging wrecks, roadblocks, and walls of the living dead? Hell yeah! And I wonder if the targeying system from Mad Max could be implemented, where you could disable vehicles (or make them crash into each other! _orgasmic breathing_). Or maybe even spike strips or vehicle traps! And Spartan-like comandeering!  
Too bad the game’s a bit of a mess right now to really do that, huh?

---

<div class="post-metadata">

**Author:** ![Greiger](https://avatars.discourse-cdn.com/v4/letter/g/8797f3/32.png) [@Greiger](https://discourse.cataclysmdda.org/u/Greiger)\
**Post date:** [November 29, 2016, 1:59pm UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/6 "2016-11-29T13:59:36Z")

</div>

Pretty sure you can already target specific tiles of a vehicle with guns damaging the parts in that tile. There just isn’t much point to atm.

---

<div class="post-metadata">

**Author:** ![Rot](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/rot/32/454_2.png) [@Rot](https://discourse.cataclysmdda.org/u/Rot)\
**Post date:** [November 29, 2016, 11:50pm UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/7 "2016-11-29T23:50:05Z")

</div>

I’ve always thought it was weird, having tank boys that were only a tile big.  
This seems like a decent idea, I can see it as an automated moving vehicle with “turrets” strapped on.

---

<div class="post-metadata">

**Author:** ![TooDAMNMuch](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@TooDAMNMuch](https://discourse.cataclysmdda.org/u/TooDAMNMuch)\
**Post date:** [December 1, 2016, 12:18am UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/8 "2016-12-01T00:18:38Z")

</div>

ai driven real vehicles would be one of the most amazing things cata:dda could add imo, then once you’ve built a deathmachine, you can give it a brain, or instead of taking apart street sweepers, you can turn them into your own personal loot-locusts.

---

<div class="post-metadata">

**Author:** ![ApatheticExcuse](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/apatheticexcuse/32/433_2.png) [@ApatheticExcuse](https://discourse.cataclysmdda.org/u/ApatheticExcuse)\
**Post date:** [December 1, 2016, 1:24am UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/9 "2016-12-01T01:24:44Z")

</div>

As a rough guess, I’d say it’s going to be a far future thing. From what I know in regards to AI pathfinding (in terms of other roguelike games) having a single tile monster navigate things is pretty simple. Having a multi-tile creature do the same is not.

Would be cool though.

---

<div class="post-metadata">

**Author:** ![DeclanFrost](https://avatars.discourse-cdn.com/v4/letter/d/e5b9ba/32.png) [@DeclanFrost](https://discourse.cataclysmdda.org/u/DeclanFrost)\
**Post date:** [December 1, 2016, 2:13am UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/10 "2016-12-01T02:13:30Z")

</div>

I wonder if they could implement it in a way that every tile was a single creature.

---

<div class="post-metadata">

**Author:** ![bostltch](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/bostltch/32/3226_2.png) [@bostltch](https://discourse.cataclysmdda.org/u/bostltch)\
**Post date:** [December 1, 2016, 3:16am UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/11 "2016-12-01T03:16:44Z")

</div>

If this were to actually be implemented at some point I’d imagine seeing a lot of collapsed buildings at the beginning of the programing from the AI just trying to ram through them, which is amusing to me.

---

<div class="post-metadata">

**Author:** ![ApatheticExcuse](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/apatheticexcuse/32/433_2.png) [@ApatheticExcuse](https://discourse.cataclysmdda.org/u/ApatheticExcuse)\
**Post date:** [December 1, 2016, 3:36am UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/12 "2016-12-01T03:36:32Z")

</div>

> [@bostltch](#):
>
> If this were to actually be implemented at some point I’d imagine seeing a lot of collapsed buildings at the beginning of the programing from the AI just trying to ram through them, which is amusing to me.

That was my exact thought. And there’d certainly be something both funny and terrifying about having a nine tile tank plow through half a city to get at you.

I don’t really know how Cata pathfinding is programmed (I’d assume some kind of fairly simple A\* variation), but if you don’t mind _that_ happening, it likely wouldn’t be super difficult to implement. Course, you might end up with a bunch of multi-tile things stuck on doorways if they can’t plow through. Either way, it would be a funny mess.

---

<div class="post-metadata">

**Author:** ![Coolthulhu](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/coolthulhu/32/2446_2.png) [@Coolthulhu](https://discourse.cataclysmdda.org/u/Coolthulhu)\
**Post date:** [December 1, 2016, 8:29am UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/13 "2016-12-01T08:29:16Z")

</div>

The problem isn’t really multi-tile part, it’s rotations and velocity.

Shoving a big square brick around would only require stretching every obstacle and treating the vehicle as a single tile.

With rotations and velocity, the pathfinding not only has to find a path - it has to find a list of actions the vehicle has to perform to get there.  
For example, in normal pathfinding, your actions can be described as “go north, go north-west, go north”. In vehicle pathfinding, they are “turn 30 degrees left, accelerate 10 km/h, wait (just keep old velocity and facing), turn 30 degrees right”.

Here’s a similar problem solved by Factorio devs: [https://www.factorio.com/blog/post/fff-113](https://www.factorio.com/blog/post/fff-113)  
In our case we’d also have velocity to take care of, meaning another dimension (literally dimension - rotations are treated as dimensions on pathfinding graph) to take care of.

---

<div class="post-metadata">

**Author:** ![ApatheticExcuse](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/apatheticexcuse/32/433_2.png) [@ApatheticExcuse](https://discourse.cataclysmdda.org/u/ApatheticExcuse)\
**Post date:** [December 1, 2016, 8:58am UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/14 "2016-12-01T08:58:54Z")

</div>

@ factorio page

That’s rather interesting, thanks for sharing.

And that’s quite a bit more complex than I’d assumed it to be (though my game programming knowledge is admittedly limited to having done a couple very simple RLs in Python). I had no idea how vehicle pathfinding works in Cata. I assumed the components of a vehicle would be treated as seperate objects following one set of instructions (I hadn’t considered velocity either), not as a single one. If I understand right, that’s not the case.

---

<div class="post-metadata">

**Author:** ![vivat](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/vivat/32/98_2.png) [@vivat](https://discourse.cataclysmdda.org/u/vivat)\
**Post date:** [December 1, 2016, 3:11pm UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/15 "2016-12-01T15:11:28Z")

</div>

> [@Hibou](#):
>
> If there was someone out there willing to take on the monstrous task of programming an AI capable of controlling a multi-tile body, and then getting it to actually drive as if it were on four wheels, or treads, or whatever, then this would be possible and make a very, very nice addition to the game as a whole.

but for what?  
is not need to create “new unneeded kindnesses”.  
any car can paint himself on the map, yes? yes! and all what you need is to teach zombie to drive the car.  
i think you need new flag “car-driver” - so zombie and other monsters (critters is not a “monsters”) can not to drive… or can. and you will have a real CARmageddon because there is no save from big trucks in the houses because zombie not have “self-save sence” 🙂  
under zombie i mean the AI which may be friendly and may be not.  
because is what is NPC? NPC is AI-driven monster. from here we have what player-character is a “player-driven monster”  
is the NPC have inventory? yes  
can NPC use their inventory items? yes.

can zombie use items? hmm i think yes.  
and - is the zombie is driven by the NPC-AI-subroutine or for the zombie is zombue-AI-subroutine?  
but this question is - i think - need to write to developers.

---

<div class="post-metadata">

**Author:** ![Shadow86](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/shadow86/32/589_2.png) [@Shadow86](https://discourse.cataclysmdda.org/u/Shadow86)\
**Post date:** [December 1, 2016, 7:23pm UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/16 "2016-12-01T19:23:39Z")

</div>

At first one would think vehicle pathfinding wouldn’t be all that hard if they were simply restricted to roads, but then you realize there’s usually derelicts along them, and they would have to be maneuvered around. And then there’s large open spaces that should be accessible to AI vehicles, but they need precise maneuvering as well if you don’t want them to run into most rocks along the way.

So it seems like a pretty damn tricky scenario overall. It would be nice to have, sure, but it appears to be an immensely difficult thing to implement.

---

<div class="post-metadata">

**Author:** ![Vastin](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/vastin/32/9912_2.png) [@Vastin](https://discourse.cataclysmdda.org/u/Vastin)\
**Post date:** [December 1, 2016, 8:56pm UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/17 "2016-12-01T20:56:34Z")

</div>

Pathfinding for vehicles could be monstrously difficult - especially because their width is variable, not just from car to car, but also when turning (because you can rotate the corners into things). This change of aspect ratio would give any attempt at A\* complete fits.

If you wanted to use A\* without serious modification, you’d have to treat any vehicle as being as wide as its longest axis regardless of how it is rotated. Basically even a bicycle would be treated as if it were a 3x3 wide car, in order to deal with its rotation, while a 3x3 car is (I think) treated as a 4x4 object in order to deal with all its width permutations as it turns, and so on. An RV would have trouble seeing its way down a wide open road, because its width would be treated as its maximum diagonal length, which is enormous.

Oh, and this is ignoring the concept of turning radius, which is another thing that most pathing algorithms cannot easily incorporate. Altogether the pathing for cars alone could easily make for a major implementation project - usually that sort of effort is restricted to big budget games like GTA or Halo.

These restrictions would be so great that A\* would pretty much choke for anything but small vehicles on clear open roads, which means you’d have to find a bunch of clever ways to make A\* smarter - which will usually make it slower, and greatly increase the implementation complexity, and could put a serious drain on constraints like working memory.

Altogether it’d be a very interesting project for a more talented programmer than me to prove their badassitude on. 😉

---

<div class="post-metadata">

**Author:** ![TooDAMNMuch](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@TooDAMNMuch](https://discourse.cataclysmdda.org/u/TooDAMNMuch)\
**Post date:** [December 1, 2016, 9:18pm UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/18 "2016-12-01T21:18:52Z")

</div>

[quote=“Coolthulhu, post:13, topic:13041”]The problem isn’t really multi-tile part, it’s rotations and velocity.

Shoving a big square brick around would only require stretching every obstacle and treating the vehicle as a single tile.

With rotations and velocity, the pathfinding not only has to find a path - it has to find a list of actions the vehicle has to perform to get there.  
For example, in normal pathfinding, your actions can be described as “go north, go north-west, go north”. In vehicle pathfinding, they are “turn 30 degrees left, accelerate 10 km/h, wait (just keep old velocity and facing), turn 30 degrees right”.

Here’s a similar problem solved by Factorio devs: [https://www.factorio.com/blog/post/fff-113](https://www.factorio.com/blog/post/fff-113)  
In our case we’d also have velocity to take care of, meaning another dimension (literally dimension - rotations are treated as dimensions on pathfinding graph) to take care of.[/quote]

maybe simplifying the speed an ai would try to drive a vehicle at could help?

say no matter the vehicle and it’s capabilities an ai would only try to drive it at 20km/h or some other standardized speed.

---

<div class="post-metadata">

**Author:** ![RedPine](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/redpine/32/4995_2.png) [@RedPine](https://discourse.cataclysmdda.org/u/RedPine)\
**Post date:** [December 3, 2016, 5:51am UTC](https://discourse.cataclysmdda.org/t/future-of-robots-hostile-ai-vehicles/13041/19 "2016-12-03T05:51:43Z")

</div>

If anyone’s brave enough to tackle the problem, I’d recommend making “multi tile monsters that drop vehicle parts on death” instead of trying to make a monster that understand how to drive. I’ve always thought that chickenwalkers would make more sense as a 2x2 size monster - you could even get around most pathfinding issues by letting it step over (or plow through if aggroed) vehicles/trees etc.

For that matter, just a framework for a multi tile monster period would be fun for adding bosses and whatnot. I remember the worms in NetHack were simply a “head” with body segments trailing behind it - the pathfinding with that approach is quite simple. A monster “head” that summons tentacles / floating limbs / ground spikes could also be quite scenic (and potentially quite dangerous). Back on subject with vehicles, though, a multitile robot with individual segments (missile launcher, treads, etc) that could be targeted would be a fun albeit difficult project.
