Package megamek.common.pathfinder
package megamek.common.pathfinder
-
ClassDescriptionAbstractPathFinder<N,
C, E> This class provides a skeletal implementation of pathfinder algorithm in a given directed graph.AdjacencyMap<E>Factory for retrieving neighbouring edges.This set of classes is intended for use for pathfinding by aerodyne units on ground maps with an atmosphere Usage anywhere else may result in "unpredictable" behaviorThis class removes all off-board paths, but keeps track of the shortest of all the paths removedThis class is intended to be used by the bot for generating possible paths for aerospace units on a low-altitude atmospheric map.Relaxes edge based on the supplied comparator, with special considerations for flying off the map (since this will likely always look back to the comparator).This class generates move paths suitable for use by an aerospace unit operating on a space map, with 'advanced flight' turned off.This class handles the tracking of "clusters" of movable areas for various movement types, either with or without destruction awareness.A data structure representing a set of coordinates to which an entity can move.This class is intended to be used to find a (potentially long) legal path given a movement type from a particular hex to the specified board edgeA transient class used to lazy-load "calculated" information from an entityNode defined by coordinates and unit facing.DestinationMap<N,E> Represents a function for retrieving destination node of an edge.Returns true if last processed move path had final position equal to destination.Handles the generation of ground-based move paths that contain information relating to the destruction of terrain necessary to accomplish that path.EdgeRelaxer<C,E> Represents a function that relaxes an edge.This set of classes is intended to be used by AI players to generate paths for infantry units.Pathfinder that specialises in finding paths that can enter a single hex multiple times.Comparator that sorts MovePaths based on lexicographical order of triples:
(hexes traveled; thrust used; 0 - (hexes flown in a straight line))
Works only with aerospace.Relaxer for aero movement.Relaxer for longest path movement.Comparator that sorts MovePaths based on, in order, the following criteria: Minefield hazard (stepping on fewer mines is better) The Least MP used Most distance movedComparator that sorts MovePaths based on lexicographical order of pairs:Movement types that are relevant for "destruction-aware pathfinding" Have a close relationship but are not exactly one to one with entity movement modes.Returns the final CoordsWithFacing for a given MovePath.Generic implementation of AbstractPathFinder when we restrict graph nodes to (coordinates x facing) and edges to MovePaths.Relaxes edge by favouring MovePaths that end in a not prone stance.This set of classes is intended to be used by AI players to generate paths for infantry units.Functional Interface forNextStepsAdjacencyMap.getAdjacent(MovePath)This class contains functionality that takes a given path and generates a list of child paths that go up to walk/run/run+masc/sprint/sprint+masc MP usage.This class handles pathfinding for situations where the unit is prone and wants to remain prone for whatever reason (no leg, getting up will result in exposure to fire, etc.)Implementation of MovePathFinder designed to find the shortest path between two hexes or finding the shortest paths from a single hex to all surrounding.This set of classes is intended to be used by AI players to generate paths for units behaving like spheroid DropShips in atmosphere.The stop condition that is processed after every successful relaxation.A timeout stop condition.