Please review any and all PUBLIC repositories, groups and associate files. These allow anyone on the Internet to access without authentication. Repository and group owners are responsible for their content and permission settings. Go to your project(s), click on Settings > General and expand the "Visibility, project features, permissions" to change this setting.

Commit 3e2677b2 authored by Brutzman, Don's avatar Brutzman, Don

today's update

parent 54193994
;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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment