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

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

Previous topic - Next topic

Nimrod

Quote
(This raises the obvious question, why didn't I put a road in for my promo pics to better demonstrate my algorithm's cleverness? This is why I'm a software developer and not a marketer)

That sold me xD ... fantastic mod! updating to 1.1 now (no sappers so far)

mmance

I tried v1.0 and I had a problem with visitors tunneling to leave my base.  I once had 25 visitors take 12 different paths where they dug very long tunnels (some 30 blocks long) to leave.  They were not trapped, but I had the doors forbidden.  I don't know if that was it.  I disabled your mod and have not had any other experiences.   I will try v1.1 today.

I also have had the sappers dig through a distant mountain for no reason and then give up and leave.

ahouneko

#32
The sapper pathfinding (v1.1) does great than Vanilla. But in some situation it seems odd.......
Especially in narrow tunnel with doors.

----------------------------------------------------------------
Obviously, AI were smart enough to choose the short-cut.




But they would throw grenade on the door while their men were digging.




Even worse in the narrow tunnel. Non-stopping team kills.




Error Log. It might come from pathfinding overflow ?  And that made AI keep killing their own guys ?




Comparison in Vanilla. Kept Waiting for the digging job finished.




By the way, it also worked well and had no problem like that in v1.0 . Perhaps due to sapper pathfinding logic (Vanilla Like) ?


Serenity

#33
I might be able to test later if visitors like to dig themselves out of the map. I have a boomalope man hunter pack roaming at the main entrance, so I forbade that door. And I there is a group of visitors in my base. There is however an alternative exit off the map that may be even shorter to walk. I just hope they don't do anything stupid :(

EDIT:
Things went fine. Hooray. They recognized the alternative exit and used that :)

I also just got another sapper raid and with the new version they directly attacked by base

kcirdor

I just had some guest dig through the wall of my base to exit instead of going to the door a few feet away. If i didn't notice it I'd have been screwed on the next raid.

KTVSUN

#35
Quote from: kcirdor on October 09, 2016, 02:49:06 PM
I just had some guest dig through the wall of my base to exit instead of going to the door a few feet away. If i didn't notice it I'd have been screwed on the next raid.

I have the same issue with guests from the hospitality mod but it looks like it is an issue on the side of hospitality. It has just been updated to try to fix it. Will post if it keeps doing it.

And actually it s not all guests, it s guest while there is a raid.

K

K

Dingo

MAJOR bug with this mod: A sapper-based raid spawned on the other side of the map, their pawns can't actually get to me because they reach a pathfinding threshold. Every pawn that reaches this threshold resets their search, micro-freezes the entire client and of course does it again, freezes again etc.

They will never get to my colony unless I disable BP. I can safely disable BP, make them raid me, finish the raid and enable BP without corrupting my save.

Here are downloads for testing, if you need it:
The buggy save file
My currently installed mod pack
My ModsConfig with current load order


hentiger

Preapologize about my linguistic skills. I live in non-english speak world... My word choice and writing skills would be awful

Zhentar

Quote from: Dingo on October 12, 2016, 08:11:45 PM
MAJOR bug with this mod: A sapper-based raid spawned on the other side of the map, their pawns can't actually get to me because they reach a pathfinding threshold. Every pawn that reaches this threshold resets their search, micro-freezes the entire client and of course does it again, freezes again etc.

Thank you for the excellent bug report. I immediately knew what the cause was (and had actually already unintentionally fixed it in my in-progress development), but the save really helped me test that the fix worked - and find a couple other issues at the same time (including a Vanilla pathfinding bug!)

New Release:
Better Pathfinding v1.2
https://github.com/Zhentar/BetterPathfinding/releases/download/1.2/Better.Pathfinding.v1.2.zip

  • Fixes sapper pathfinding failure on very large, difficult to path maps.
  • Fixes Vanilla pathfinding bug where sappers thing they can walk on water
  • Improves pathfinding performance for "smart" raiders
  • Paths with impassible destination cells (e.g. mining, repairing) now use the improved logic, rather than falling back to Vanilla logic.

Dingo

Thank you! Glad I could help fix some issues.

Nimrod

I get a bug (critical error in the debugger) with v1.2 - single pawns freeze.

Happened twice - both times visitors where around (I use Hospitality)
One was a chunk-to-stockpile job, the other a steel-to-wall if I remember correctly.
when I disable BetterPathfinding the bug disappears

I am almost certain the bug comes from this mod, but of course I cant be sure if its some interaction with others (especially hospitality)

I know, I know ... debug log ...  I just wanted to play a little today, not debug (but I guess I can provide a screen if it helps) xD

Just a heads up. Great mod!
cheers!

JerryBi

Exception ticking Dorna: System.NullReferenceException: Object reference not set to an instance of an object
  at BetterPathfinding.RegionLinkDijkstra.GetRegionDistance (Verse.Region region, Verse.RegionLink& minLink) [0x00000] in <filename unknown>:0
  at BetterPathfinding.RegionPathCostHeuristic.GetPathCostToRegion (Int32 cellIndex) [0x00000] in <filename unknown>:0
  at BetterPathfinding.PathFinder.FindPathInner (IntVec3 start, TargetInfo dest, TraverseParms traverseParms, PathEndMode peMode, HeuristicMode mode) [0x00000] in <filename unknown>:0
  at BetterPathfinding.PathFinder._FindPath (IntVec3 start, TargetInfo dest, TraverseParms traverseParms, PathEndMode peMode) [0x00000] in <filename unknown>:0
  at Verse.AI.PathFinder.FindPath (IntVec3 start, TargetInfo dest, Verse.Pawn pawn, PathEndMode peMode) [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_PathFollower.GenerateNewPath () [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_PathFollower.TrySetNewPath () [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_PathFollower.TryEnterNextPathCell () [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_PathFollower.PatherTick () [0x00000] in <filename unknown>:0
  at Verse.Pawn.Tick () [0x00000] in <filename unknown>:0
  at Verse.TickList.Tick () [0x00000] in <filename unknown>:0


pawn just froze , and error in one second was repeated more then 200 times..

Nimrod

Quote from: masaykh on October 14, 2016, 10:34:41 AM
Exception ticking Dorna: System.NullReferenceException: Object reference not set to an instance of an object
  at BetterPathfinding.RegionLinkDijkstra.GetRegionDistance (Verse.Region region, Verse.RegionLink& minLink) [0x00000] in <filename unknown>:0
  at BetterPathfinding.RegionPathCostHeuristic.GetPathCostToRegion (Int32 cellIndex) [0x00000] in <filename unknown>:0
  at BetterPathfinding.PathFinder.FindPathInner (IntVec3 start, TargetInfo dest, TraverseParms traverseParms, PathEndMode peMode, HeuristicMode mode) [0x00000] in <filename unknown>:0
  at BetterPathfinding.PathFinder._FindPath (IntVec3 start, TargetInfo dest, TraverseParms traverseParms, PathEndMode peMode) [0x00000] in <filename unknown>:0
  at Verse.AI.PathFinder.FindPath (IntVec3 start, TargetInfo dest, Verse.Pawn pawn, PathEndMode peMode) [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_PathFollower.GenerateNewPath () [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_PathFollower.TrySetNewPath () [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_PathFollower.TryEnterNextPathCell () [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_PathFollower.PatherTick () [0x00000] in <filename unknown>:0
  at Verse.Pawn.Tick () [0x00000] in <filename unknown>:0
  at Verse.TickList.Tick () [0x00000] in <filename unknown>:0


pawn just froze , and error in one second was repeated more then 200 times..

Ha, thats the one I got too. There you go :D

Zhentar

Thanks for reporting the issue. I'll get a fix up tonight; in the meantime I've put the 1.1 download link back in the OP.

Facepunch