Skip to content

Releases: bsommerfeld/pathetic

Release 5.5.2

Choose a tag to compare

@bsommerfeld bsommerfeld released this 16 Jun 11:34

Build Success Tests Succeeded

Changelog

Added

  • PathfinderHook.onPathfindingStart default hook, called once before the search loop begins
  • PathfindingContext.target() and PathfindingContext.environmentContext() accessors
  • Package-level JavaDoc for every api and engine package

Changed

  • PathfinderConfiguration.build() now fails when no provider is set instead of silently defaulting to an always-traversable one; the deprecated no-arg createPathfinder() keeps its documented default
  • Fewer allocations on the per-search pathfinding hot path
  • A* per-search state moved off the pathfinder's ThreadLocal into a stack-local SearchState passed through the loop; concurrent searches stay isolated by the call stack

Fixed

Removed

Release 5.5.1

Choose a tag to compare

@bsommerfeld bsommerfeld released this 11 Jun 03:26

Build Success Tests Succeeded

Changelog

Added

Changed

  • Searches complete 2.5-3x faster end-to-end than 5.5.0 and short searches start about 7x faster (measured with the bundled benchmarks)
  • Pack node keys relative to the search start, lifting all absolute coordinate limits (formerly X/Z in [-33554432, 33554431], Y in [-2048, 2047])
  • A single search explores at most +-2097151 blocks (X/Z) and +-524287 blocks (Y) around its start; positions beyond this radius are treated as non-navigable
  • Switch the engine's open set to the quaternary min-heap, keyed by dense per-search node ids
  • AbstractPathfinder.initializeSearch now receives the start position and expected node count; subclasses must key the open set by dense non-negative ids
  • Open-set, closed-set, and reopen G-cost lookups are id-indexed array accesses behind a single hash map per neighbor
  • Deprecate the gridCellSize/bloomFilterSize/bloomFilterFpp options (marked for removal); the closed set no longer uses bloom-filtered grid regions
  • Defer neighbor node construction until after the closed-set check, skipping allocation and heuristic work for closed neighbors
  • Size per-search session structures from the same node estimate as the open-set heap; short searches set up in a fraction of the time

Fixed

  • Reuse the reopen-decision G-cost when reopening a closed node instead of recomputing it
  • A reopen attempt vetoed by a validator no longer lowers the recorded closed-set G-cost
  • Runtime exceptions from custom extensions during a search now produce a FAILED result instead of escaping through the future
  • A non-finite heuristic or cost now fails the search with a descriptive error instead of corrupting the open-set ordering
  • QuaternaryPrimitiveMinHeap.extractMin now throws NoSuchElementException on an empty heap instead of corrupting internal state
  • QuaternaryPrimitiveMinHeap rejects ids outside the non-negative int range instead of truncating and aliasing them

Removed

  • Remove SpatialData; the engine's closed set is id-indexed and no longer bloom-filtered
  • Remove the shaded Guava dependency and the checkerframework/javax.annotation relocations from the engine artifact

Release 5.5.0

Choose a tag to compare

@bsommerfeld bsommerfeld released this 09 Jun 15:00

Build Success Tests Succeeded

Changelog

Added

  • Add executorService option to PathfinderConfiguration [#194] by @lynxplay

Changed

  • Cache neighbor offset lists in NeighborStrategies to avoid per-iteration allocations
  • Tighten PathImpl constructor parameter from Iterable<PathPosition> to Collection<PathPosition>
  • Reject all null arguments in Validators factories (allOf, anyOf, noneOf, not) with NullPointerException
  • Size the open-set heap per search from manhattanDistance * branchingFactor, capped by maxIterations
  • Snapshot pathfinder hooks at search start; mid-search registrations now apply only to future searches
  • Deprecate PathfinderFactory.createPathfinder() no-arg overload (always-traversable provider routes through walls)
  • PathPosition.distance now uses exact Math.sqrt instead of an approximation; deprecate NumberUtils.sqrt
  • RegionKey.pack now validates coordinate ranges (X/Z in [-33554432, 33554431], Y in [-2048, 2047]) and throws instead of silently aliasing out-of-range values

Fixed

  • Add input validation for numeric values in PathfinderConfiguration
  • Guard PathVector.computeDistance against null arguments and degenerate B == C input
  • Correct PathfinderResult.hasFailed() JavaDoc - FALLBACK is not treated as a failure
  • Print full stack trace (not just message) when a processor's finalizeSearch throws
  • PathfinderConfiguration.deepCopy now defensively clones processor and hook lists so the copy is independent of later source mutations
  • Document the single-threaded contract of SearchContext.getSharedData() in JavaDoc
  • Cost.of now rejects +Infinity, -Infinity, and NaN (previously only NaN and negative values)
  • PathfindingSearch.resultBlocking now propagates the JDK CompletionException directly instead of re-wrapping it in a generic RuntimeException
  • Clarify in JavaDoc that PathfindingSearch.exceptionally is a side-effect callback and does not recover the search
  • Default shared executor is lazily allocated and only when an async configuration is built; sync-only configurations never spawn the thread pool
  • api classes are no longer shaded into the engine artifact; engine now pulls api as a clean transitive dependency
  • Reject NaN heap costs in insertOrUpdate; a NaN heuristic now fails fast instead of silently corrupting the open-set ordering
  • Correct heuristic JavaDoc: with default weights LINEAR is only bounded-suboptimal (Weighted-A*-like) and SQUARED is not admissible, not "consistent/admissible" as claimed

Removed

  • Remove unused Pathetic engine-version utility and its pathetic.properties resource
  • Remove Depth.increment() and make Depth immutable
  • Remove Cloneable and clone() from PathPosition and PathVector; coordinate fields are now final
  • Remove Comparable from Node; its cost-based ordering was inconsistent with position-based equals

Release 5.4.6

Choose a tag to compare

@bsommerfeld bsommerfeld released this 11 Feb 15:18

Build Success Tests Succeeded

Changelog

Added

  • PathfindingSearch#done() - check if search is complete
  • PathfindingSearch#resultBlocking() - block until result is available
  • PathfindingSearch#result() - get result if available

Changed

  • PathfinderSearchImpl is now package-private

Fixed

Removed

  • JetBrains annotations dependency

Release 5.4.5

Choose a tag to compare

@bsommerfeld bsommerfeld released this 30 Jan 00:36

Build Success Tests Succeeded

Changelog

Added

Changed

  • PathfindingSearch#exceptionally now accepts a Consumer instead of a Function
  • aborting the current pathfinding operation now triggers #orElse instead of #exceptionally and returns an ABORTED PathfindingResult
  • #abort now returns void

Fixed

  • added defensive cleanup for PathfindingSession
  • fixed issue with algorithm cleanup not being performed consistently
  • fixed abort behavior to ensure cooperative cancellation

Removed

Release 5.4.4

Choose a tag to compare

@bsommerfeld bsommerfeld released this 29 Jan 23:26

Build Success Tests Succeeded

Changelog

Added

  • add JetBrains annotations dependency
  • add pathfindingHooks to PathfinderConfiguration
  • introduced PathfindingSearch which represents a single search operation
  • introduced validationProcessors in PathfinderConfigurationBuilder
  • introduced costProcessors in PathfinderConfigurationBuilder

Changed

  • marked getEnvironmentContext Nullable in SearchContext
  • replaced CompletionStage return from Pathfinder with PathfindingSearch
  • simplified exception handling in AbstractPathfinder
  • aborting the pathfinding operation is now per-search

Fixed

Removed

  • deprecated nodeValidationProcessors in PathfinderConfigurationBuilder
  • deprecated nodeCostProcessors in PathfinderConfigurationBuilder
  • deprecated Pathfinder#registerPathfindingHooks

Release 5.4.3

Choose a tag to compare

@bsommerfeld bsommerfeld released this 28 Jan 17:36

Build Success Tests Succeeded

Changelog

5.4.3 is a cleanup release, focusing on code organization and deprecating outdated features.

Added

  • introduced .of(double, double, double) factory methods for PathVector and PathPosition
  • introduced Depth#value()
  • introduced Cost#value()

Changed

  • introduced MinHeap, Resizable, Siftable interfaces to abstract the heap implementations
  • extracted release workflow into own repository

Fixed

Removed

  • deprecated Depth#getValue()
  • deprecated Pathfinder#abort()
  • deprecated Cost#getValue()
  • ErrorLogger has been removed
  • tinylog dependencies have been removed
  • deprecated PathUtils
  • removed outdated jitpack.yml

Release 5.4.2

Choose a tag to compare

@bsommerfeld bsommerfeld released this 26 Jan 15:31

Build Success Tests Succeeded

Changelog

Added

  • .integration-tests module with pathfinding workflow tests
  • added JMH benchmarks for internal heaps

Changed

  • GridRegionData is now SpatialData
  • AStarPathfinder.PathfindingSession has been extracted

Fixed

  • ${revision} placeholder
  • prevent duplicate exception logging in async mode
  • added missing fastutil dependency classes

Removed

Release 5.4.1

Choose a tag to compare

@bsommerfeld bsommerfeld released this 08 Jan 23:55

Build Success Tests Succeeded

Changelog

Added

  • Update Dependencies Maven Configuration
  • Run Tests Maven Configuration
  • Build Jar Maven Configuration
  • A specialized, array-backed binary heap tailored for A*
  • Introduced overloaded getOffset(PathPosition) method in INeighborStrategy
  • Implemented support for reopening Closed Set nodes to handle inconsistent heuristics (configurable via reopenClosedNodes).

Changed

  • Revamp README for better engagement – add humor, benchmarks, and real-world demos to combat stagnation
  • optimized core data structures for reduced GC pressure and cleaned up legacy code
  • Switched internal Open Set implementation from Fibonacci to PrimitiveMinHeap.
  • ~3x to 4.5x faster pathfinding in benchmarks due to improved CPU cache locality.
  • Achieved true zero-allocation operations within the Open Set (eliminated millions of Node wrapper and Double boxing objects).
  • Renamed NodeCostProcessor -> CostProcessor
  • Renamed NodeValidationProcessor -> ValidationProcessor
  • Renamed NodeEvaluationContext -> EvaluationContext

Fixed

  • removed legacy lazy computing of hcost
  • Fixed subtle yet crucial a control flow bug where updates to nodes in the Open Set were ignored, ensuring the optimal path is always prioritized.

Removed

  • Several before deprecated Methods (see 5.4.0)
  • Tuple3 + Tests
  • ComputingCache + Tests
  • org.jheaps dependency
  • Experimental annotation

Release 5.4.0

Choose a tag to compare

@bsommerfeld bsommerfeld released this 30 Oct 13:09

Build Success Tests Succeeded

Changelog

Pathetic 5.4.0 is now available on Maven Central.

Added

  • Path has a new collect() method.
  • Added more tests to AStarPathfinderTest
  • Introduced PathUtils class
  • Introduced DistanceCalculator interface
  • Introduced PathfindingProgress class

Changed

  • Optimized tie-breaker calculations
  • Cost now only can be positive
  • PathImpl now delegates several functions to PathUtils class
  • Refactored heuristic implementations with DistanceCalculators

Fixed

  • Fixed SquaredHeuristicStrategy with now a matching squared manhattan, octile and heightDiff calculation which improved performance

Removed

  • Deprecated negativeCost configuration
  • Deprecated several specific distance calculations inside PathPosition
  • Several Path post-processing methods are now Deprecated and PathUtils should be used
  • Deprecated PathPosition#isInSameBlock