Skip to content
Snippets Groups Projects
Commit 3e2677b2 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

today's update

parent 54193994
No related branches found
No related tags found
No related merge requests found
;This code written in ANSI Common Lisp, Allegro 10.1 enhancement, from Franz, Inc., by
;Prof. Robert B. McGhee (robertbmcghee@gmail.com) at the Naval Postgraduate School,
; , CA 93943. Date of latest update: 11 June 2020.
; , CA 93943. Date of latest update: 30 June 2020.
;The mission coded below is taken from Fig. 7, pg. 434, in "Ethical Mission Definition
;and Execution for Maritime Robots Under Human Supervision", IEEE Journal of Oceanic
......@@ -48,6 +48,11 @@
(defvar *current-paths-to-goal* nil)
(defvar *path-to-goal* '(s s s s))
(defvar *all-algorithmic-paths* nil)
(defvar *mission-execution-scenario* nil)
(defvar *all-human-directed-paths* '((X X) (X F) (X S) (F X X) (F X F) (F X S) (F F X) (F F F) (F F S) (F S X) (F S F)
(F S S) (S X X) (S X F) (S X S) (S F) (S S X X) (S S X F) (S S X S) (S S F X) (S S F F) (S S F S) (S S S X) (S S S F)
(S S S S))) ;From 6/22/20 results emailed to NPS team.
(defvar agent1)
(defvar agent2)
(defvar phase1)
......@@ -70,6 +75,16 @@
(successor-list-index :accessor successor-list-index :initform 1)
(current-outcome-sequence :accessor current-outcome-sequence :initform nil)))
(defclass DAG-find-all-paths-agent ()
((current-search-phase :accessor current-search-phase :initform 'phase1)
(successor-list :accessor successor-list :initform nil)
(successor-list-index :accessor successor-list-index :initform 0)
(all-paths-to-frontier :accessor all-paths-to-frontier :initform nil)
(all-paths-to-goal :accessor all-paths-to-goal :initform nil)
(new-paths-list-length :accessor new-paths-list-length :initform nil)
(new-paths-list :accessor new-paths-list :initform nil)
(new-path-segments-list :accessor new-path-segments-list :initform nil)))
(defun create-5-mission-phases ()
(setf phase1 (make-instance 'mission-phase)
phase2 (make-instance 'mission-phase)
......@@ -224,15 +239,6 @@
;;;;;;;;;;;;;;;;;;;;;;Algorithmic Proof of Correctness by Breadth First Exhaustive Search;;;;;;;;;;;;;;;;;;;;;
(defclass DAG-find-all-paths-agent ()
((current-search-phase :accessor current-search-phase :initform 'phase1)
(successor-list :accessor successor-list :initform nil)
(successor-list-index :accessor successor-list-index :initform 0)
(all-paths-to-frontier :accessor all-paths-to-frontier :initform nil)
(all-paths-to-goal :accessor all-paths-to-goal :initform nil)
(new-paths-list-length :accessor new-paths-list-length :initform nil)
(new-paths-list :accessor new-paths-list :initform nil)
(new-path-segments-list :accessor new-path-segments-list :initform nil)))
;DAG means "Directed Acyclic Graph".
......@@ -319,3 +325,17 @@
(defun results ()
(pprint (all-paths-to-goal agent2)))
(defun save-results ()
(setf *all-algorithmic-paths* (all-paths-to-goal agent2)
*mission-execution-scenario* (first *all-algorithmic-paths*)))
(defun convert-path-element-to-symbol (x)
(cond ((equal x "Success.") 's)
((equal x "Failure.") 'f)
((equal x "Exception.") 'x)))
(defun abbreviate-scenario-element ()
(let* ((element (pop *mission-execution-scenario*))
(symbol (convert-path-element-to-symbol element)))
(list element symbol)))
\ No newline at end of file
......@@ -11,286 +11,59 @@ CG-USER(1):
; Foreign loading ssleay32.dll.
; Foreign loading sys:aclissl.dll.
; Fast loading
; C:\acl10.1express-new\2020 Code\Lisp 2018 Mission All Paths\Exhaustive Testing and Execution of 2018 JOE MIssion.fasl
; C:\acl10.1express-new\2020 Code\Lisp 2018 Mission All Paths\New Exhaustive Testing and Execution of 2018 JOE Mission.fasl
CG-USER(1): (start)
READY
CG-USER(2): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:s
Sample environment!
Is execution outcome success (s), failure (f), or exception (x)?:s
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:s
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:s
Proceed to recovery!
((S S S S))
CG-USER(3): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:s
Sample environment!
Is execution outcome success (s), failure (f), or exception (x)?:s
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:s
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:f
Proceed to recovery!
((S S S F) (S S S S))
CG-USER(4): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:s
Sample environment!
Is execution outcome success (s), failure (f), or exception (x)?:s
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:s
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:x
Proceed to recovery!
((S S S X) (S S S F) (S S S S))
CG-USER(5): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:s
Sample environment!
Is execution outcome success (s), failure (f), or exception (x)?:s
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:f
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:s
Proceed to recovery!
((S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(6): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:s
Sample environment!
Is execution outcome success (s), failure (f), or exception (x)?:s
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:f
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:f
Proceed to recovery!
((S S F F) (S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(7): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:s
Sample environment!
Is execution outcome success (s), failure (f), or exception (x)?:s
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:f
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:x
Proceed to recovery!
((S S F X) (S S F F) (S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(8): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:s
Sample environment!
Is execution outcome success (s), failure (f), or exception (x)?:s
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:x
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:s
Proceed to recovery!
((S S X S) (S S F X) (S S F F) (S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(9): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:s
Sample environment!
Is execution outcome success (s), failure (f), or exception (x)?:s
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:x
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:f
Proceed to recovery!
((S S X F) (S S X S) (S S F X) (S S F F) (S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(10): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:s
Sample environment!
Is execution outcome success (s), failure (f), or exception (x)?:s
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:x
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:x
Proceed to recovery!
((S S X X) (S S X F) (S S X S) (S S F X) (S S F F) (S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(11): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:s
Sample environment!
Is execution outcome success (s), failure (f), or exception (x)?:f
Proceed to recovery!
((S F) (S S X X) (S S X F) (S S X S) (S S F X) (S S F F) (S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(12): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:s
Sample environment!
Is execution outcome success (s), failure (f), or exception (x)?:x
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:s
Proceed to recovery!
((S X S) (S F) (S S X X) (S S X F) (S S X S) (S S F X) (S S F F) (S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(13): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:s
Sample environment!
Is execution outcome success (s), failure (f), or exception (x)?:x
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:f
Proceed to recovery!
((S X F) (S X S) (S F) (S S X X) (S S X F) (S S X S) (S S F X) (S S F F) (S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(14): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:s
Sample environment!
Is execution outcome success (s), failure (f), or exception (x)?:x
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:x
Proceed to recovery!
((S X X) (S X F) (S X S) (S F) (S S X X) (S S X F) (S S X S) (S S F X) (S S F F) (S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(15): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:f
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:s
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:s
Proceed to recovery!
((F S S) (S X X) (S X F) (S X S) (S F) (S S X X) (S S X F) (S S X S) (S S F X) (S S F F) (S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(16): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:f
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:s
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:f
Proceed to recovery!
((F S F) (F S S) (S X X) (S X F) (S X S) (S F) (S S X X) (S S X F) (S S X S) (S S F X) (S S F F) (S S F S) (S S S X) (S S S F)
(S S S S))
CG-USER(17): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:f
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:s
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:x
Proceed to recovery!
((F S X) (F S F) (F S S) (S X X) (S X F) (S X S) (S F) (S S X X) (S S X F) (S S X S) (S S F X) (S S F F) (S S F S) (S S S X)
(S S S F) (S S S S))
CG-USER(18): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:f
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:f
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:s
Proceed to recovery!
((F F S) (F S X) (F S F) (F S S) (S X X) (S X F) (S X S) (S F) (S S X X) (S S X F) (S S X S) (S S F X) (S S F F) (S S F S)
(S S S X) (S S S F) (S S S S))
CG-USER(19): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:f
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:f
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:f
Proceed to recovery!
((F F F) (F F S) (F S X) (F S F) (F S S) (S X X) (S X F) (S X S) (S F) (S S X X) (S S X F) (S S X S) (S S F X) (S S F F)
(S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(20): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:f
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:f
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:x
Proceed to recovery!
((F F X) (F F F) (F F S) (F S X) (F S F) (F S S) (S X X) (S X F) (S X S) (S F) (S S X X) (S S X F) (S S X S) (S S F X) (S S F F)
(S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(21): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:f
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:x
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:s
Proceed to recovery!
((F X S) (F F X) (F F F) (F F S) (F S X) (F S F) (F S S) (S X X) (S X F) (S X S) (S F) (S S X X) (S S X F) (S S X S) (S S F X)
(S S F F) (S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(22): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:f
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:x
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:f
Proceed to recovery!
((F X F) (F X S) (F F X) (F F F) (F F S) (F S X) (F S F) (F S S) (S X X) (S X F) (S X S) (S F) (S S X X) (S S X F) (S S X S)
(S S F X) (S S F F) (S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(23): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:f
Search Area B!
Is execution outcome success (s), failure (f), or exception (x)?:x
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:x
Proceed to recovery!
((F X X) (F X F) (F X S) (F F X) (F F F) (F F S) (F S X) (F S F) (F S S) (S X X) (S X F) (S X S) (S F) (S S X X) (S S X F)
(S S X S) (S S F X) (S S F F) (S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(24): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:x
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:s
Proceed to recovery!
((X S) (F X X) (F X F) (F X S) (F F X) (F F F) (F F S) (F S X) (F S F) (F S S) (S X X) (S X F) (S X S) (S F) (S S X X) (S S X F)
(S S X S) (S S F X) (S S F F) (S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(25): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:x
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:f
Proceed to recovery!
((X F) (X S) (F X X) (F X F) (F X S) (F F X) (F F F) (F F S) (F S X) (F S F) (F S S) (S X X) (S X F) (S X S) (S F) (S S X X)
(S S X F) (S S X S) (S S F X) (S S F F) (S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(26): (run)
Search Area A!
Is execution outcome success (s), failure (f), or exception (x)?:x
Rendezvous with Vehicle2!
Is execution outcome success (s), failure (f), or exception (x)?:x
Proceed to recovery!
CG-USER(2): (all-paths)
DONE
CG-USER(3): (save-results)
(PHASE1 "Search Area A!" "Success." PHASE2 "Sample environment!" "Success." PHASE3 "Search Area B!" "Exception." PHASE4 ...)
CG-USER(4): (pprint *all-algorithmic-paths*)
((PHASE1 "Search Area A!" "Success." PHASE2 "Sample environment!" "Success." PHASE3 "Search Area B!" "Exception." PHASE4
"Rendezvous with Vehicle2!" "Exception." PHASE5)
(PHASE1 "Search Area A!" "Success." PHASE2 "Sample environment!" "Success." PHASE3 "Search Area B!" "Exception." PHASE4
"Rendezvous with Vehicle2!" "Failure." PHASE5)
(PHASE1 "Search Area A!" "Success." PHASE2 "Sample environment!" "Success." PHASE3 "Search Area B!" "Exception." PHASE4
"Rendezvous with Vehicle2!" "Success." PHASE5)
(PHASE1 "Search Area A!" "Success." PHASE2 "Sample environment!" "Success." PHASE3 "Search Area B!" "Failure." PHASE4
"Rendezvous with Vehicle2!" "Exception." PHASE5)
(PHASE1 "Search Area A!" "Success." PHASE2 "Sample environment!" "Success." PHASE3 "Search Area B!" "Failure." PHASE4
"Rendezvous with Vehicle2!" "Failure." PHASE5)
(PHASE1 "Search Area A!" "Success." PHASE2 "Sample environment!" "Success." PHASE3 "Search Area B!" "Failure." PHASE4
"Rendezvous with Vehicle2!" "Success." PHASE5)
(PHASE1 "Search Area A!" "Success." PHASE2 "Sample environment!" "Success." PHASE3 "Search Area B!" "Success." PHASE4
"Rendezvous with Vehicle2!" "Exception." PHASE5)
(PHASE1 "Search Area A!" "Success." PHASE2 "Sample environment!" "Success." PHASE3 "Search Area B!" "Success." PHASE4
"Rendezvous with Vehicle2!" "Failure." PHASE5)
(PHASE1 "Search Area A!" "Success." PHASE2 "Sample environment!" "Success." PHASE3 "Search Area B!" "Success." PHASE4
"Rendezvous with Vehicle2!" "Success." PHASE5)
(PHASE1 "Search Area A!" "Success." PHASE2 "Sample environment!" "Exception." PHASE4 "Rendezvous with Vehicle2!" "Exception."
PHASE5)
(PHASE1 "Search Area A!" "Success." PHASE2 "Sample environment!" "Exception." PHASE4 "Rendezvous with Vehicle2!" "Failure."
PHASE5)
(PHASE1 "Search Area A!" "Success." PHASE2 "Sample environment!" "Exception." PHASE4 "Rendezvous with Vehicle2!" "Success."
PHASE5)
(PHASE1 "Search Area A!" "Failure." PHASE3 "Search Area B!" "Exception." PHASE4 "Rendezvous with Vehicle2!" "Exception." PHASE5)
(PHASE1 "Search Area A!" "Failure." PHASE3 "Search Area B!" "Exception." PHASE4 "Rendezvous with Vehicle2!" "Failure." PHASE5)
(PHASE1 "Search Area A!" "Failure." PHASE3 "Search Area B!" "Exception." PHASE4 "Rendezvous with Vehicle2!" "Success." PHASE5)
(PHASE1 "Search Area A!" "Failure." PHASE3 "Search Area B!" "Failure." PHASE4 "Rendezvous with Vehicle2!" "Exception." PHASE5)
(PHASE1 "Search Area A!" "Failure." PHASE3 "Search Area B!" "Failure." PHASE4 "Rendezvous with Vehicle2!" "Failure." PHASE5)
(PHASE1 "Search Area A!" "Failure." PHASE3 "Search Area B!" "Failure." PHASE4 "Rendezvous with Vehicle2!" "Success." PHASE5)
(PHASE1 "Search Area A!" "Failure." PHASE3 "Search Area B!" "Success." PHASE4 "Rendezvous with Vehicle2!" "Exception." PHASE5)
(PHASE1 "Search Area A!" "Failure." PHASE3 "Search Area B!" "Success." PHASE4 "Rendezvous with Vehicle2!" "Failure." PHASE5)
(PHASE1 "Search Area A!" "Failure." PHASE3 "Search Area B!" "Success." PHASE4 "Rendezvous with Vehicle2!" "Success." PHASE5)
(PHASE1 "Search Area A!" "Success." PHASE2 "Sample environment!" "Failure." PHASE5)
(PHASE1 "Search Area A!" "Exception." PHASE4 "Rendezvous with Vehicle2!" "Exception." PHASE5)
(PHASE1 "Search Area A!" "Exception." PHASE4 "Rendezvous with Vehicle2!" "Failure." PHASE5)
(PHASE1 "Search Area A!" "Exception." PHASE4 "Rendezvous with Vehicle2!" "Success." PHASE5))
CG-USER(5): *all-human-directed-paths*
((X X) (X F) (X S) (F X X) (F X F) (F X S) (F F X) (F F F) (F F S) (F S X) ...)
CG-USER(6): (pprint *all-human-directed-paths*)
((X X) (X F) (X S) (F X X) (F X F) (F X S) (F F X) (F F F) (F F S) (F S X) (F S F) (F S S) (S X X) (S X F) (S X S) (S F)
(S S X X) (S S X F) (S S X S) (S S F X) (S S F F) (S S F S) (S S S X) (S S S F) (S S S S))
CG-USER(27):
; Foreign loading winspool.drv.
DISCUSSION
This is our first fully successful human execution of JOE 2018 mission orders, with all possible mission scenario outcomes in numerical order. It was amazingly hard for me to complete this without typos. Recall that "alphabetical order" of each human response to above queries is "s, f, x". Algorithm to respond to each iteration of "(run)" is simply "enter next response sequence with lowest decimal serial number"; i.e., "in alphabetical order".
CG-USER(7): (pprint (reverse *all-human-directed-paths*))
My next coding goal is to write needed code to be able to prove that human response sequences above are identical to those produced by automated bread-first search (latter results also demonstrated yesterday). Jon, it was a pleasure having you with us yesterday. Please continue to join us for our Tuesday 1300 meetings if you can. Russell reference you sent to us is very helpful to me in understanding our work in reference to others. Briefly, we are NOT working in AI! I consider that our only serious expertise is in finite state machine theory and its application to military matters.
\ No newline at end of file
((S S S S) (S S S F) (S S S X) (S S F S) (S S F F) (S S F X) (S S X S) (S S X F) (S S X X) (S F) (S X S) (S X F) (S X X) (F S S)
(F S F) (F S X) (F F S) (F F F) (F F X) (F X S) (F X F) (F X X) (X S) (X F) (X X))
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment