swarm-0.7.0.0: 2D resource gathering game with programmable robots
LicenseBSD-3-Clause
Safe HaskellNone
LanguageHaskell2010

Swarm.Game.Step.Path.Type

Description

Types for shortest-path-finding and logging path-cache invalidation events.

By convention, a [Location] does not include the starting location, whereas a NonEmpty Location does.

Consequentially, an empty [Location] implies that the robot's current location is already at the goal location.

A gratuitous number of sum types are defined here to facilitate explainability of caching behavior via logs.

Synopsis

Documentation

data PathfindingParameters a Source #

This is parameterized on the starting location, as we may either want to:

  1. provide the planar start location (when first computing the path), or
  2. suppress it and only propagate the subworld name (when retrieving from cache), which precludes the downstream possibility of accidentally mixing up the planar location of the target with the current robot location.

Constructors

PathfindingParameters 

Fields

Instances

Instances details
Functor PathfindingParameters Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

ToJSON a => ToJSON (PathfindingParameters a) Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Generic (PathfindingParameters a) Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Associated Types

type Rep (PathfindingParameters a) 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep (PathfindingParameters a) = D1 ('MetaData "PathfindingParameters" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "PathfindingParameters" 'PrefixI 'True) (S1 ('MetaSel ('Just "distanceLimit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: (S1 ('MetaSel ('Just "startingLoc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Just "searchGoal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PathfindingTarget))))
Show a => Show (PathfindingParameters a) Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Eq a => Eq (PathfindingParameters a) Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep (PathfindingParameters a) Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep (PathfindingParameters a) = D1 ('MetaData "PathfindingParameters" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "PathfindingParameters" 'PrefixI 'True) (S1 ('MetaSel ('Just "distanceLimit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: (S1 ('MetaSel ('Just "startingLoc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Just "searchGoal") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 PathfindingTarget))))

data CachePreservationMode Source #

It is possible for the cache to be unaffected by certain events, or the cache may modified without fully recomputing the shortest path.

Constructors

Unmodified 
PathTruncated 

Instances

Instances details
ToJSON CachePreservationMode Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Generic CachePreservationMode Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Associated Types

type Rep CachePreservationMode 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep CachePreservationMode = D1 ('MetaData "CachePreservationMode" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "Unmodified" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PathTruncated" 'PrefixI 'False) (U1 :: Type -> Type))
Show CachePreservationMode Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Eq CachePreservationMode Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep CachePreservationMode Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep CachePreservationMode = D1 ('MetaData "CachePreservationMode" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "Unmodified" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PathTruncated" 'PrefixI 'False) (U1 :: Type -> Type))

data CacheLogEntry Source #

Constructors

CacheLogEntry 

Fields

Instances

Instances details
ToJSON CacheLogEntry Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Generic CacheLogEntry Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Associated Types

type Rep CacheLogEntry 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep CacheLogEntry = D1 ('MetaData "CacheLogEntry" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "CacheLogEntry" 'PrefixI 'True) (S1 ('MetaSel ('Just "robot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RID) :*: S1 ('MetaSel ('Just "event") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CacheEvent)))
Show CacheLogEntry Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Eq CacheLogEntry Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep CacheLogEntry Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep CacheLogEntry = D1 ('MetaData "CacheLogEntry" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "CacheLogEntry" 'PrefixI 'True) (S1 ('MetaSel ('Just "robot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RID) :*: S1 ('MetaSel ('Just "event") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CacheEvent)))

data CacheRetrievalAttempt Source #

Instances

Instances details
ToJSON CacheRetrievalAttempt Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Generic CacheRetrievalAttempt Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Associated Types

type Rep CacheRetrievalAttempt 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep CacheRetrievalAttempt = D1 ('MetaData "CacheRetrievalAttempt" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "Success" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RecomputationRequired" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CacheRetreivalInapplicability)))
Show CacheRetrievalAttempt Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Eq CacheRetrievalAttempt Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep CacheRetrievalAttempt Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep CacheRetrievalAttempt = D1 ('MetaData "CacheRetrievalAttempt" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "Success" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RecomputationRequired" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CacheRetreivalInapplicability)))

data CacheEvent Source #

Certain events can obligate the cache to be completely invalidated, or partially or fully preserved.

Instances

Instances details
ToJSON CacheEvent Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Generic CacheEvent Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Associated Types

type Rep CacheEvent 
Instance details

Defined in Swarm.Game.Step.Path.Type

Show CacheEvent Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Eq CacheEvent Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep CacheEvent Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

data DistanceLimitChange Source #

Instances

Instances details
ToJSON DistanceLimitChange Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Generic DistanceLimitChange Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Associated Types

type Rep DistanceLimitChange 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep DistanceLimitChange = D1 ('MetaData "DistanceLimitChange" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "LimitIncreased" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PathExceededLimit" 'PrefixI 'False) (U1 :: Type -> Type))
Show DistanceLimitChange Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Eq DistanceLimitChange Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep DistanceLimitChange Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep DistanceLimitChange = D1 ('MetaData "DistanceLimitChange" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "LimitIncreased" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PathExceededLimit" 'PrefixI 'False) (U1 :: Type -> Type))

data DifferentArgument Source #

Instances

Instances details
ToJSON DifferentArgument Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Generic DifferentArgument Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Associated Types

type Rep DifferentArgument 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep DifferentArgument = D1 ('MetaData "DifferentArgument" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) ((C1 ('MetaCons "NewSubworld" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NewTargetType" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NewWalkabilityContext" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NewDistanceLimit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DistanceLimitChange))))
Show DifferentArgument Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Eq DifferentArgument Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep DifferentArgument Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep DifferentArgument = D1 ('MetaData "DifferentArgument" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) ((C1 ('MetaCons "NewSubworld" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NewTargetType" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NewWalkabilityContext" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NewDistanceLimit" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DistanceLimitChange))))

data CacheRetreivalInapplicability Source #

Reasons why we cannot re-use a precomputed path from the cache upon re-invoking the Path command

Instances

Instances details
ToJSON CacheRetreivalInapplicability Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Generic CacheRetreivalInapplicability Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Associated Types

type Rep CacheRetreivalInapplicability 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep CacheRetreivalInapplicability = D1 ('MetaData "CacheRetreivalInapplicability" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "NotCached" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DifferentArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DifferentArgument)) :+: C1 ('MetaCons "PositionOutsidePath" 'PrefixI 'False) (U1 :: Type -> Type)))
Show CacheRetreivalInapplicability Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Eq CacheRetreivalInapplicability Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep CacheRetreivalInapplicability Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep CacheRetreivalInapplicability = D1 ('MetaData "CacheRetreivalInapplicability" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "NotCached" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DifferentArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DifferentArgument)) :+: C1 ('MetaCons "PositionOutsidePath" 'PrefixI 'False) (U1 :: Type -> Type)))

data InvalidationReason Source #

Reasons for cache being invalidated

Instances

Instances details
ToJSON InvalidationReason Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Generic InvalidationReason Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Associated Types

type Rep InvalidationReason 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep InvalidationReason = D1 ('MetaData "InvalidationReason" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) ((C1 ('MetaCons "TargetEntityAddedOutsidePath" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TargetEntityRemoved" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UnwalkableRemoved" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "UnwalkableOntoPath" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NonexistentRobot" 'PrefixI 'False) (U1 :: Type -> Type))))
Show InvalidationReason Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Eq InvalidationReason Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep InvalidationReason Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep InvalidationReason = D1 ('MetaData "InvalidationReason" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) ((C1 ('MetaCons "TargetEntityAddedOutsidePath" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TargetEntityRemoved" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UnwalkableRemoved" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "UnwalkableOntoPath" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NonexistentRobot" 'PrefixI 'False) (U1 :: Type -> Type))))

data PathfindingTarget Source #

Shortest paths can either be computed to the nearest entity of a given type or to a specific location.

Constructors

LocationTarget Location 
EntityTarget EntityName

Note: navigation to entities does not benefit from the distance heuristic optimization of the A* algorithm (but see #1568)

Instances

Instances details
ToJSON PathfindingTarget Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Generic PathfindingTarget Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Associated Types

type Rep PathfindingTarget 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep PathfindingTarget = D1 ('MetaData "PathfindingTarget" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "LocationTarget" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Location)) :+: C1 ('MetaCons "EntityTarget" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 EntityName)))
Show PathfindingTarget Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Eq PathfindingTarget Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep PathfindingTarget Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep PathfindingTarget = D1 ('MetaData "PathfindingTarget" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "LocationTarget" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Location)) :+: C1 ('MetaCons "EntityTarget" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 EntityName)))

newtype TailMap Source #

Facilitates lookup of any shortest path to a particular goal cell, given a location that already lies on a shortest path.

Constructors

TailMap (Map Location [Location]) 

Instances

Instances details
ToJSON TailMap Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Generic TailMap Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Associated Types

type Rep TailMap 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep TailMap = D1 ('MetaData "TailMap" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'True) (C1 ('MetaCons "TailMap" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Location [Location]))))

Methods

from :: TailMap -> Rep TailMap x #

to :: Rep TailMap x -> TailMap #

Show TailMap Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Eq TailMap Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Methods

(==) :: TailMap -> TailMap -> Bool #

(/=) :: TailMap -> TailMap -> Bool #

type Rep TailMap Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep TailMap = D1 ('MetaData "TailMap" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'True) (C1 ('MetaCons "TailMap" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Location [Location]))))

data CachedPath Source #

Constructors

CachedPath 

Fields

Instances

Instances details
ToJSON CachedPath Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Generic CachedPath Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Associated Types

type Rep CachedPath 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep CachedPath = D1 ('MetaData "CachedPath" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "CachedPath" 'PrefixI 'True) (S1 ('MetaSel ('Just "originalPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty Location)) :*: S1 ('MetaSel ('Just "locations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TailMap)))
Show CachedPath Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Eq CachedPath Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep CachedPath Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep CachedPath = D1 ('MetaData "CachedPath" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "CachedPath" 'PrefixI 'True) (S1 ('MetaSel ('Just "originalPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (NonEmpty Location)) :*: S1 ('MetaSel ('Just "locations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 TailMap)))

data PathfindingCache Source #

A per-robot cache for the path command.

Instances

Instances details
ToJSON PathfindingCache Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Generic PathfindingCache Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Associated Types

type Rep PathfindingCache 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep PathfindingCache = D1 ('MetaData "PathfindingCache" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "PathfindingCache" 'PrefixI 'True) ((S1 ('MetaSel ('Just "invocationParms") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PathfindingParameters SubworldName)) :*: S1 ('MetaSel ('Just "walkabilityInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 WalkabilityContext)) :*: (S1 ('MetaSel ('Just "targetLoc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Location) :*: S1 ('MetaSel ('Just "cachedPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CachedPath))))
Show PathfindingCache Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

Eq PathfindingCache Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep PathfindingCache Source # 
Instance details

Defined in Swarm.Game.Step.Path.Type

type Rep PathfindingCache = D1 ('MetaData "PathfindingCache" "Swarm.Game.Step.Path.Type" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-engine" 'False) (C1 ('MetaCons "PathfindingCache" 'PrefixI 'True) ((S1 ('MetaSel ('Just "invocationParms") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PathfindingParameters SubworldName)) :*: S1 ('MetaSel ('Just "walkabilityInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 WalkabilityContext)) :*: (S1 ('MetaSel ('Just "targetLoc") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Location) :*: S1 ('MetaSel ('Just "cachedPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CachedPath))))

data PathCaching Source #

Constructors

PathCaching 

Fields

pathCachingLog :: Lens' PathCaching (RingBuffer CacheLogEntry) Source #

Event log for cache invalidation

pathCachingRobots :: Lens' PathCaching (IntMap PathfindingCache) Source #

All the RIDs of robots that are storing a cached path that may require invalidation.