[A16] Better Pathfinding (v1.5.2 update 2/22)

Started by Zhentar, October 02, 2016, 07:43:01 PM

Previous topic - Next topic

mathwizi2005

A mod someone (don't know who) made that forces plant ticks into another thread, specifically every plant gets its own thread. Sadly, its kinda buggy as plants tend to.....get frozen at 5% so I don't recommend yet.

faltonico

Quote from: mathwizi2005 on April 28, 2017, 08:38:13 PM
A mod someone (don't know who) made that forces plant ticks into another thread, specifically every plant gets its own thread. Sadly, its kinda buggy as plants tend to.....get frozen at 5% so I don't recommend yet.
I wound't mind testing it *drools*

milon

Quote from: mathwizi2005 on April 28, 2017, 06:12:54 PM
off topic, wth is the 'spoiler' syntax, nothing I type in seems to be accepted and I wanted to avoid a long ass post

We don't have spoiler tags here :(

milon

sheidula's post was split from here into its own thread for better assistance:
https://ludeon.com/forums/index.php?topic=32045.0

Zhentar

Quote from: Rock5 on March 25, 2017, 03:14:48 AM
I've spent a couple of weeks building a pathfinding algorithm tester in c#. I've finally got it to the point where both the A* and my modified weighted JPS work as optimally as I can get them. Here is a snapshot of a hand drawn rimworld like map.


As you can see, this path took 74ms. With A* the best I could get is about 300ms. That is optimal paths only, no sacrificing accuracy for performance. That is about a quarter of the time. I'm quite happy with that.

I'll post it soon, somewhere, I'm not sure where yet. Maybe I'll post a copy here for some feedback. I designed it as best I could to make it easy for anyone to add their own algorithm to test. I hope I succeeded.

So my question to you Zhentar, while doing your work, did you even pull any map data for testing purposes or do you know how I might pull data about the a map weights so I can try a real map in my program?

A bit late on this, but you can check out what I did in my github repository here (including half a dozen of my test cases): https://github.com/Zhentar/BetterPathfinding/tree/master/OfflineTester


Quote from: mathwizi2005 on April 28, 2017, 06:12:54 PM
Ok I think I found an issue. Feels more like a mod compatibility problem since....I played a game thru with no issues....then I add a few more mods and this happens.

Lets lay out the problems. Pawn randomly freezes in place and frame rate plummets significantly. Error is as follows repeating every tick or so

Something is messed up about the room Toni is in, and it's resulting in a corrupt region grid. Better Pathfinding heavily depends upon the region grid, so it tends to fail quite visibly when there are problems with it. Other parts of the game that depend upon it tend to have much more subtle effects. The region grid corruption can't be caused by Better Pathfinding, so it's most likely a result of one of the other mods (although I know there is at least one bug in the region generation algorithm in A16, so it's not impossible that it's a Vanilla issue).

mathwizi2005

Apparently the Tick Multithread mod I was experimenting with was causing the issue. The plan was to put PLANTS onto their own thread per tick but it seems it expanded beyond just plants as that one cell Toni was trying to get to was literally right next to the pawn with nothing on the tile, literally NOTHING. I have since removed the mod and the problems disappeared overnight.

TOG II

I suggest you post your mod [Here] for a possible official integration.
░░░░░░███████ ▄▄▄▄▄▄▄▄▃
   ▂▄▅█████████▅▄▃▂
I███████████████████]
◥⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲⊙◤

Zhentar

There's no need; it's already included in A17.

milon

Quote from: TOG II on May 06, 2017, 04:57:29 PM
I suggest you post your mod [Here] for a possible official integration.

FYI, that's the mods announcement thread, used to advertise the existence of a mod. I think you were meaning the mod nomination thread here: https://ludeon.com/forums/index.php?topic=29505.0

Quote from: Zhentar on May 06, 2017, 10:19:49 PM
There's no need; it's already included in A17.

Woo hoo, that's awesome Zhentar!

ultra4

That is great. On one hand no need for your mod anymore, but that means you deserve a whole bunch of thanks, you made the game a lot better

stigma

Quote from: Zhentar on May 06, 2017, 10:19:49 PM
There's no need; it's already included in A17.

That is very cool to hear (congratulations!)

I think it would be a very good idea to put a big red notice about this in the first post of this thread though. It would save a lot of time and confusion for people.

-Stigma

Canute

Quote from: Zhentar on May 06, 2017, 10:19:49 PM
There's no need; it's already included in A17.
Maybe overthink your choise.
Playing on the rainforest mod, my Builder build roads through the jungle, and once he is want to break, he move straight through the jungle instead to use his own builld path.

Maybe not an issue about pathfinding, but caravan rarely exit the map through the selected direction you select at the option. I set south, because the base is at the south, south is a road closeby, and the pawns move 1 day to the north through the jungle to exit.

wwWraith

Think about it. Think around it. Perhaps you'll get some new good idea even if it would be completely different from my words.

Canute

Yep i know, thats why want a revival of this mod ! :-)