Searching for the best strategy (II)

Photo by JESHOOTS.COM on Unsplash
(left) Graphical representation of a state with one Death Guard against 5 Ultramarines; (right) Representation of a state and its two successor states after expanding two different actions.
(left) The same representation as above; (right) Representation of a state and its two successor with their heuristic values represented. Notice that expose the soldier to the enemy fire is worse than holding an objective.
Domain for the W40K problem
(:goal 
(and
(or
(conquer plaguemarines1 o-1)
(conquer plaguemarines1 o-2)
(conquer plaguemarines1 o-3)
(conquer plaguemarines1 o-4)
)
(or
(conquer plaguemarines2 o-1)
(conquer plaguemarines2 o-2)
(conquer plaguemarines2 o-3)
(conquer plaguemarines2 o-4)
)
(or
(conquer daemonprince o-1)
(conquer daemonprince o-2)
(conquer daemonprince o-3)
(conquer daemonprince o-4)
)
(killed hellblasters)
(killed intercessors)
(killed lieutenant)
)
)
Computed plan for the W40K problem
Movement phase of the Death Guard.
Psychic phase of the Death Guard
Shooting phase of the Death Guard
(:action shot 
:parameters (?who ?target)
:precondition (and
(ranged_weapon ?who)
(in_range ?who ?target)
(not (shooted ?who))
)
:effect (and
(shooted ?who)
(when (and (healthy ?target)) (and (wounded ?target) (not (healthy ?target))) )
(when (wounded ?target) (killed ?target) ) ) )
(kill daemonprince hellblasters)
(kill plaguemarines1 hellblasters)
(kill plaguemarines2 intercessors)
Charges and attacks for the Combat phase.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store