PERSONAL EMERGENCY MANAGEMENT using the FREE LIFE PLANNER By Andrew John Dougherty --- Formalized Research Database: Cluster, Study and Apply (FRDCSA) Project --- Ontolog Summit 2022 Track 3: Environment Disasters April 20th, 2022 --- This talk is in memory of: My beloved sister Ann, whose tragic death when I was 10 years old drives to this day my unswerving commitment to the completion of this technology. Christina Taft's beloved mother, Victoria Taft, whose tragic death in the Paradise, California wildfire in 2018 drives her tireless commitment to emergency management technology. --- ## SECTION Introduction === --- 'Predicting, Monitoring, Mitigating and Managing' (Environmental) Disasters === This talk concerns 'predicting, monitoring, mitigating and managing' (environmental) disasters. ---
Example Environmental Disasters: • Climate change • Environmental pollution • Wildfires • Floods • Habitat loss--- I suggest what I (dryly) term a 'draconian solution' (i.e. reducing the problem to a harder problem). --- As an analogy, I 'reduce' the environmental disaster problem to general life planning, and put forth a satisficing implementation called the Free Life Planner aka FLP as a solution, --- and demonstrate how it applies in the specific case of handling environmental disasters. --- Preview of the Free Life Planner (FLP) --- file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/images/flp-screenshots-1.png === Here are some (outdated) screenshots of services that the Free Life Planner provides. --- file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/images/flp-screenshots-2.png === This talk is going to focus on this intelligent personal assistant which will help individuals to take control of every aspect of their lives, including but not limited to emergency preparedness. --- file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/clips/iem-20220327-cycle-weekly3.mp4#t=40,50 === This video shows one temporal planning subsystem called Interactive Execution Monitor version 2 (a.k.a. IEM2), which is part of the backend behind FLP. There is a corresponding web front end to this planning system. --- ## SECTION The Problem of Environmental Disasters === ---
Some dimensions of the problem:
• Prevention
• Reducing individual contribution
• E.g. committing to recycling, lowering
electrical usage, etc
• Reducing collective contribution
• E.g. preventing industrial accidents
• Management
• Protecting people from disasters
• Notification and evacuation
• Sociological implications
• Increased exposure of the poor
===
There are many dimensions to the problem of environmental disasters.
---
In July of 2021 I wrote Al Gore regarding FLP, describing how one
use-case dealt with helping people to reduce their environmental
footprint.
---
The use-case could be implemented via a particular kind of intelligent
tutoring system, which elicits from the user all the relevant
behaviors they engage in that affect their environmental footprint.
---
FLP would then check whether or not these behaviors conform to (local)
best practices in its rulebase. When they do not, the system would
attempt to act as an accountability partner to help keep them on track
towards modifying their behaviors.
---
## https://en.wikipedia.org/wiki/2004_Indian_Ocean_earthquake_and_tsunami/
file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/images/tsunami.png
===
A second example of an environmental disaster that could have been
mitigated is the 2004 Indian Ocean earthquake and tsunami, which took
over 200,000 lives. A cellphone warning system could have alerted and
directed many more people to safety. This tragedy was disheartening
because, although an idea is not an implementation, at that time I had
been campaigning 2 years with no discernable progress for this system.
22 years on, although it hasn't yet made its impact, much technical
progress on FLP fortunately has been made.
---
https://frdcsa.org/~andrewdo/writings/artificialintelligence-second-half.txt
===
In 2003, I wrote an article on general purpose accident avoidance
using Cyc and sensor networks. This article talked about using Cyc
and KBS systems to make life-saving inferences. Although it describes
a counterfactual scenario where a child using this system avoids being
hit by a train, it bears strong resemblance to the problem of sending
messages telling people within certain spatial regions to alter their
behavior, such as to help move themselves, others nearby and loved
ones to higher ground to avoid a tsunami.
---
https://en.wikipedia.org/wiki/2021_European_floods/
===
Or, moving to higher ground to avoid flash floods. The July 2021
floods in many European countries including Germany were an
illustration of unprecedented weather saturating the emergency
response coordination.
---
These are a few examples of where FLP would be useful. However, being
a life planner, it is intended to adequately manage many other
situations and types of events.
---
Some General Use Cases for FLP:
• Natural and Man-made Disasters
• Pandemics
• Climate Change
• Conditions
• Poverty
• Homelessness
• Disability
• Illness
• Domestic violence
• etc
===
Here are some of the use cases for FLP.
---
## FIXME: Strengthen
https://owntracks.org/booklet/
===
For positional reasoning, FLP currently integrates with the Own Tracks
system, part of FLP's Location Logic subsystem. OwnTracks tracks
users' location via cellphone, and is free/libre software.
---
file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/images/flp-subsystems.png
===
The FLP GitHub pages list many of its current subsystems, which are in
various states of completion.
---
## SECTION
The Free Life Planner (FLP)
===
---
About:
• Free/Libre Social Friendly A.I.
• For day to day life
• Generating and walking through plans
• Behavior modification
• For emergencies
• Emergency preparedness
• Emergency management
===
I will now focus on how to create 'Free-Libre Social Friendly
Artificial Intelligence' in service of the problems of day to day
living, including planning and behavior modification, and also
emergencies, through emergency preparedness and emergency management.
This can be achieved through systems integration and software
applications of Knowledge-Based Systems.
---
Purpose:
• Need Intelligent Personal Assistant
• Ensure 'Last Mile Delivery' of services
• Provides public health and policy data
• With fine-grained consent or
secure multi-party computation
===
There is a need for an intelligent personal assistant which is with
the user in the trenches, enabling the last mile delivery of salient
guidance, and conversely uploading evidence for public health.
---
file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/clips/iem2-wsm.mp4#t=0,22
===
FLP is intended to 'eventually always' meet this need. FLP is a
mobile friendly web application, which plans preactively, proactively
and reactively - at multiple levels of granularity - in order to both
survive and thrive on a daily basis, and prepare for managing
emergencies when necessary.
---
Goals of the talk:
• Convince the audience:
• How zero marginal cost (ZMC) + libre + gratis
properties enable ~8,000,000,000 potential FLP
users
• Precedent: GNU/Linux
• That 'FLP could help save lives, improve quality
of life and reduce suffering'
• To enlist your support in completing,
releasing and promoting FLP and FRDCSA
===
The purpose of the talk is threefold. First, to illustrate that
because free/libre software is freely redistributable and can assist
people indirectly, whether or not they have a computer, it has the
potential to offer help to almost everyone on the planet, in the same
way that GNU/Linux could. Second, to convince you that FLP could in
fact help save lives, improve quality of life, and reduce intense
suffering. Third, to enlist your active support of these projects.
---
Disclaimers:
• I am partially self-taught (so a lot of what I
say here hasn't been independently verified)
• I have difficulty summarizing
• First video generated by my PresGen system
• Apologize for the use of Text-To-Speech
===
Some disclaimers.
---
Suggestions:
• Please re-watch and occasionally pause
• Please type any questions into the chat
which I can then answer
===
And some suggestions. There is more relevant information than I am
able to summarize contained in this presentation, so I recommend
re-watching the video and occasionally pausing it as needed.
---
Outline of talk: • Introduction • The Problem of Environmental Disasters • The Free Life Planner (FLP) • Plan-Monitor • Jason/AgentSpeak(L) • 'Predicting, Monitoring, Mitigating and Managing' Threats • The WOPR System • Prepping and Survivalism • The PrologCyc Discipline • E2C, NLU and NLU-MF and Rule Mining • A.I. Planning Technologies in FLP • Releasing FLP • The FRDCSA Project • Releasing the FRDCSA • FRDCSA Theory=== Outline of the talk. --- ## https://www.youtube.com/watch?v=mk35eReQKvo file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/clips/Paradise-Camp-Fire-Evacuation---11-13-2020---v1-mk35eReQKvo.mkv#t=60,74 === This video by Paul Fierro shows his excellent simulation of a counterfactual evacuation of Paradise, California from the Camp Fire that started on November 8, 2018. One way to frame the problem of emergency management focuses on the 'global', 3rd-person, top-down, macro perspective. --- https://upload.wikimedia.org/wikipedia/commons/1/19/Woolsey_Fire_evacuation_from_Malibu_on_November_9%2C_2018.jpg === Another way to frame the problem is to focus on the "local," 1st-person, bottom-up, micro perspective. --- file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/clips/plan-monitor-cell-phone-editted.mp4#t=0,15 === This can be achieved for instance via a mobile hands-free plan monitoring application, such as the one I developed shown here. --- https://live.staticflickr.com/4465/37560568716_61d7508169_b.jpg === I use a fisheye lens here as a metaphor for this 1st person perspective. FLP operates from this individual perspective, which may be federated to form a community, and thus focuses on the community perspective as well. --- "File:Woolsey Fire evacuation from Malibu on November 9, 2018.jpg" by Cyclonebiskit is marked with CC BY-SA 4.0. To view the terms, visit https://creativecommons.org/licenses/by-sa/4.0/?ref=openverse === --- "Canyon Fire 2" by /\ltus is marked with CC BY-NC-ND 2.0. To view the terms, visit https://creativecommons.org/licenses/by-nc-nd/2.0/?ref=openverse === --- ## SECTION Plan-Monitor === --- file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/behavior-tree-task-manager-for-covid-19-1-2.ppm.jpg === Originally, I was to give a presentation on the Pandemic Track regarding my COVID-19 Behavior Tree paper that recommended developing a Prolog-based 'plan monitoring system', but fell short of fully implementing one. The plan monitoring system was conceived to help overcome the last mile delivery of efficacious knowledge and procedures for reducing the spread of and mitigating the effect of COVID-19. --- file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/behavior-tree-task-manager-for-covid-19-3-4.ppm.jpg === Unfortunately this paper, written at the very beginning of the pandemic, really missed the mark. I had not predicted that a sizable percentage of the population would not be willing to adhere to guidelines for measures like wearing masks or being vaccinated. Any successful disaster management strategy must therefore account for the human factors present. --- file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/behavior-tree-task-manager-for-covid-19-5.ppm.jpg === Nevertheless, finishing the original Plan-Monitor would still be of specific use to those who need extra layers of security during the pandemic, for instance the immunocompromised and their associates. As well, Plan-Monitor is of general use for interactively walking users through plans. ---
# As root export URL='https://github.com/aindilis' cpanm $URL/plan-monitor/raw/master/plan-monitor-0.01.tar.gz cpanm $URL/perl-btpm/raw/master/perl-btpm-0.01.tar.gz cpanm $URL/perl-btsk/blob/master/perl-btsk-0.01.tar.gz=== So I persisted and ultimately developed a Perl-based Plan-Monitor system, in addition to the unfinished Prolog-based system, which can be installed using the commands shown, but which did not depend on any unreleased FRDCSA code. --- file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/clips/plan-monitor-voice.webm#t=0,30 === Thus, Plan-Monitor is a mobile-friendly WebUI for walking users through tasks such as going to the doctor, the grocery, receiving mail, etc. Here it is in operation. Some important features shown here includes the ability to branch on plan failure and hands-free operation. ---
Strengths of Plan-Monitor:
• Based on behavior trees
• Real-time (including WebSocket-based WebUI)
• Ability to handle nonlinear/branching/contingent
plans
• 'Imperative reactive planning-with-sensing, and
execution'
• Hands-free operation
===
Plan-Monitor has many strengths.
---
Limitations of Plan-Monitor:
• No concurrent tasks and plans
• No deliberation
• Simple implementation
• Currently lacking more sophisticated
behavior tree features
===
However, Plan-Monitor also had some major limitations.
---
After asking the A.I. planning community, there appear to be few
options for an (open-source) system like Plan-Monitor that can handle
temporal, concurrent plans.
---
So I intend to fork plan-monitor and extend it to handle temporal
concurrent plans via behavior trees, as a front-end, and handle the
backend and merging of the concurrent plans using the previously
mentioned Interactive Execution Monitor v2 (IEM2), more of which will
be shown later.
---
sanitize_surface(Person,Surface) ==>>
ensure_state(wearing_gloves(Person,_Gloves)),
true_state(in(Surface,Room)),
true_code(isa(Room,room)),
ensure_state(well_ventilated(Room)),
true_state(holding(Person,HouseholdCleaningSprayOrWipe)),
true_code(isa(HouseholdCleaningSprayOrWipe,cleaningSpray)),
act(read_label(Person,labelFn(HouseholdCleaningSprayOrWipe))),
act(use_as_directed_on(Person,
HouseholdCleaningSprayOrWipe,
Surface)).
===
Here is an example taken from my COVID-19 paper. However, the
Prolog-based Behavior Tree software that evaluates this particular
behavior tree has not yet been fully completed.
---
## SECTION
Jason/AgentSpeak(L)
===
---
file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/images/jason.png
===
For the time being, I've taken a shortcut which will hopefully be
backwards compatible. This shortcut is to switch to using the Jason
Belief Desire Intention (BDI) Agent Architecture.
---
+!sanitize_surface(Person,Surface) <-
!wearing_gloves(Person,_Gloves);
?in(Surface,Room);
?isa(Room,room);
!well_ventilated(Room);
?holding(Person,
HouseholdCleaningSprayOrWipe);
?isa(HouseholdCleaningSprayOrWipe,
cleaningSpray);
read_label(Person,
labelFn(HouseholdCleaningSprayOrWipe));
use_as_directed_on(Person,
HouseholdCleaningSprayOrWipe,
Surface).
===
This is what the code from the earlier slide probably looks like in
Jason/AgentSpeak. Fortunately, Jason/AgentSpeak appear to implement a
superset of the features I was able to implement in the Behavior Tree
software I wrote. It is also much more mature and popular.
---
One possible mapping from our Behavior Tree software to Jason/AgentSpeak(L): • !X ⇐ ensure_state(X). • ?X ⇐ true_state(X). • ?X ⇐ true_code(X). • X : .ground(X) ⇐ act(X). • ?x(X) : not .ground(X) ⇐ act(X). • +X ⇐ begin_state(X). • -X ⇐ end_state(X).=== Here is one possible mapping from Behavior Trees to Jason/AgentSpeak. --- ## https://www.mdpi.com/electronics/electronics-10-02136/article_deploy/html/images/electronics-10-02136-g004.png file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/images/electronics-10-02136-g004.png === The default intention handling code for the Jason/AgentSpeak BDI architecture event loop operates in a round-robin fashion, and is thus FIFO workflow. This helps to avoid dropping the ball, as happens with a LIFO workflow. Because Jason is based on Prolog Interlingua, I have since integrated Jason with SWI-Prolog. --- file:///var/lib/myfrdcsa/codebases/minor/flp-videos/incoming/jason-swipl-integration.png === I intend to use Jason/SWIPL as the metaplanner to control other (PDDL/etc) planners through FLP's planning wrappers. --- ## FIXME: Logicmoo needs a slide
Metaplanning Capabilities:
• Definitely will use the Logicmoo system when stable
• Have not been able to get OpenCyc's planning and
agency abilities to work
• Planning on connecting Jason/SWIPL with OpenCyc
through either Logicmoo's code, or perhaps using
my own Cyc wrappers in Perl/Emacs-Lisp
===
Metaplanning could eventually be achieved through integrating
Logicmoo, OpenCyc, Jason and SWIPL.
---
file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/Temporal-Planning-and-Inferencing-for-Personal-Task-Management-with-SPSE2-1-2.ppm.jpg
===
Another tool mentioned in my COVID-19 paper is the Shared Priority
System Editor version 2, or SPSE2 system. This tool proved personally
useful during the pandemic.
---
file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/images/spse2-pandemic-example.png
===
I often developed 50 to 100 point temporal plans for the
accomplishment of tasks rendered more risky due to the pandemic.
SPSE2 was a predecessor of, and now a component of, the Free Life
Planner.
---
## SECTION
'Predicting, Monitoring, Mitigating and Managing' Threats
===
---
## https://frdcsa.org/~andrewdo/predicting-monitoring-mitigating-and-managing-threats.pdf#page=1
## file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/predicting-monitoring-mitigating-and-managing-threats-01.ppm.jpg
file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/predicting-monitoring-mitigating-and-managing-threats-01-02.ppm.jpg
===
Because of a family emergency, I had to withdraw my Ontolog 2022
Pandemic Track talk. However, I had already written some of a paper
which was targeted towards general threat management.
---
## https://frdcsa.org/~andrewdo/predicting-monitoring-mitigating-and-managing-threats.pdf#page=2
## file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/predicting-monitoring-mitigating-and-managing-threats-02.ppm.jpg
file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/predicting-monitoring-mitigating-and-managing-threats-03-04.ppm.jpg
===
I am now presenting in the Ontolog 2022 Environment Disasters track,
but this is just as well, since the overarching tool this presentation
is about - the Free Life Planner - subsumes both use cases.
---
## https://frdcsa.org/~andrewdo/predicting-monitoring-mitigating-and-managing-threats.pdf#page=3
## file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/predicting-monitoring-mitigating-and-managing-threats-03.ppm.jpg
## file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/predicting-monitoring-mitigating-and-managing-threats-05-06.ppm.jpg
file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/predicting-monitoring-mitigating-and-managing-threats-07-08.ppm.jpg
===
I wrote this paper, in order to talk more about threat management.
---
## https://frdcsa.org/~andrewdo/predicting-monitoring-mitigating-and-managing-threats.pdf#page=4
## file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/predicting-monitoring-mitigating-and-managing-threats-04.ppm.jpg
## file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/predicting-monitoring-mitigating-and-managing-threats-07-08.ppm.jpg
file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/predicting-monitoring-mitigating-and-managing-threats-09-10.ppm.jpg
===
This paper will be finished and released some time
after the presentation.
---
## SECTION
The WOPR System
===
---
"In a game-theoretic formulation of real world security protocols, it
is possible to try ''to treat the world as a 'game' and then win that
game by proving that bad things don't happen to people.''..."
---
"...Yet, the cardinality of possible moves is so large that the
branching-factor dominates, rendering (deeper) searches ineffectual
(except in restricted subdomains)..."
---
"...This suggests a knowledge-based approach towards inventorying and
categorizing threats." - from the upcoming ''Predicting, Monitoring,
Mitigating and Managing' Threats' paper
---
file:///var/lib/myfrdcsa/codebases/minor/free-wopr/frdcsa/project.jpg
===
Our system for managing threats to security is called WOPR, after the
contingent planning computer in the movie "War Games."
---
Through WOPR and other systems, FLP is intended to help bolster every type of security: • Social • Financial • Emotional • Food • Water • Cyber-Physical • Home • National=== Through WOPR and other systems, FLP is intended to help bolster every type of security. ---
%% Facts
isa(andrewDougherty,person).
%% Rules
planForContingency(whatIf(infected(Person,covid19))) :-
isa(Person,person).
possibleResponse(whatIf(infected(Person,covid19)),
quarantine(Person)) :-
isa(Person,person).
===
So, if isa(andrewDougherty,person) were in the WOPR Prolog factbase,
the Prolog code declares a contingency plan needs to be developed for
the possibility that I became infected with covid19, and suggests that
I should quarantine. The next step is to develop the hypothetical
contingency plan for me quarantining.
---
file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/images/flux.png
===
In order to develop contingency plans such as the quarantine plan, we
must deal with the reality that the life planning environment is
dynamic, uncertain, incomplete, underspecified, etc. Thus, it is
difficult to completely represent future states in which fluents like
'infected' might hold. One system which can handle such environments
is the General FLUX cognitive agent programming system.
---
Advantages of using General FLUX:
• Under a free/libre license
• Prolog-based
• Can model state in the fluent calculus as a list,
with an unbound variable at the tail signifying
unknown fluents
• Can make more progress now that I have more Prolog
experience
===
FLUX has many advantages. We did implement about 10 different
planning domains in FLUX.
---
Difficulties using General FLUX:
• Relatively slow
• Apparently cannot handle nested fluents
• Uses integers instead of atoms for arguments,
which we overcame using the SerPro mapping
• Have not yet received access to FLUXPlayer
• Thus, no existing planning algorithms, so I
wrote Breadth-First Search
===
However, I had some difficulties when using FLUX for this purpose.
---
Advantages of using Jason/AgentSpeak(L):
• Designed for dynamic uncertain environments
• BDI Agent Architecture
• Based on Prolog, handles nested terms with ease
• Has design patterns to implement other types of
goals, such as maintenance goals
• Peleus introduces limited STRIPS planning
abilities (based on a reductive interpretation of
Jason actions to preconditions and effects),
possibly making Jason more deliberative
## https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.66.5917&rep=rep1&type=pdf
===
Because of these difficulties, I was unable to proceed until I
rediscovered the Jason/AgentSpeak system, which is designed precisely
to handle dynamic, uncertain environments.
---
%% WOPR
?- planForContingency(X).
X = whatIf(infected(andrewDougherty)).
...
?- possibleResponse(whatIf(infected(andrewDougherty)),Y).
Y = quarantine(andrewDougherty).
...
===
WOPR is able to generate requests for the creation of plans for these
contingencies, which are then implemented as plans inside
Jason/AgentSpeak.
---
%% Jason/AgentSpeak quarantine plan +!quarantine(Person) <- ?hasRoom(Person,Room); !at(Person,Room); +obligation(doNotLeave(Person,Room)); ...=== And then the Jason/SWIPL plan is selected and executed. ---
Open Questions with WOPR/Jason:
• How do I handle time? Sequentially? Temporally?
• How do I model the environment? (EventCalc, SitCalc,
etc)?
===
Some open questions - how do I handle time or model the environment?
---
genls([impact,likelihood],risk).
genls([vulnerability,threat,risk],item).
genls([person,property,facility],target).
argIsa(hasThreat/2,1,vulnerability).
argIsa(hasThreat/2,2,threat).
argIsa(hasRisk/2,1,threat).
argIsa(hasRisk/2,2,risk).
argIsa(isExposedToThreat/2,1,target).
argIsa(isExposedToThreat/2,2,threat).
...
===
This is the beginning of a threat ontology for WOPR. Any threat
knowledge-base that I could piece together for this talk would be
incomplete, since I haven't done enough Natural Language Processing.
---
%% Some facts
genls(tornado,disasterEvent). genls(wildfire,disasterEvent).
genls(tsunami,disasterEvent). genls(flooding,disasterEvent).
genls(hurricane,disasterEvent).
%%
%% Prepare for all known disasters affecting all known persons
planForContingency(whatIf(situationAffects(DisasterEvent,Person))) :-
genls(DisasterEventType,disasterEvent),
isa(DisasterEvent,DisasterEventType),
isa(Person,person).
%% Prepare for if any todo list item is not completed
planForContingency(neg(inTime(completed(Task)))) :-
task(TaskID,Task,Criticality),
\+ completed(TaskID).
%% Mark contingency as unprepared for if no known possible response
unpreparedForContingency(Contingency) :-
planForContingency(Contingency),
\+ possibleResponse(Contingency,Response).
===
This is merely intended to be evocative of the kinds of threats that
should be included, and how FLP will deliver on these counts. We
could work on both preparations and appropriate responses ordered by
some norm on likelihood and impact.
---
## SECTION
Prepping and Survivalism
===
---
Goals of FRDCSA (and FLP): • The evasion of chance in survival • To minimize unnecessary psychological suffering=== My A.I. has been from the outset intended to improve survivability while minimizing intense suffering. These are good goals when considering prepping and survivalism. ---
Related Aspects of Free Life Planner:
• Focus on preparations, they are easier to automate
• Preparations can be likened to the first error
message in an error log.
• You don't debug the later messages, you debug the
first, since the later might be a consequence of
or otherwise affected by the first
• Preparations are usually less time-critical
===
To partially achieve this, we rely on preparations.
---
## file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/EmergencyPreparednessChecklist.pdf
file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/EmergencyPreparednessChecklist-1-2.ppm.jpg
===
These kinds of checklists are a start, but better is a persistent
assistant which guides the user to achieve and stay on top of
emergency preparedness.
---
scheduleTask(flp,
Person, checkBatteriesOnAllFireAlarmsInHome(Person,
Home))
:-
ought(maintain(Person,Home)),
lastTime(happened(Time,
checkBatteriesOnAllFireAlarmsInHome(Person,
Home))),
currentTime(CurrentTime),
duration(Time,CurrentTime,months(Duration)),
Duration > 6.
===
Here the system would schedule a task to remind the user to check
their fire alarm batteries six months after the last time they
checked.
---
%% %% maintenance of victuals
%% 1 months after the last inspection
hasRecurrenceSpec(do(Person,inspect(Person,Victuals)),
sinceLastTime(months(1)),
[10:30:0,12:0:0,15:0:0]) :-
ought(maintain(Person,Victuals)),
isa(Victuals,victuals).
===
Here is a recurrence specification to remind the user to inspect their
food and water supplies once a month, provided they are obligated to
maintain them.
---
https://frdcsa.org/~andrewdo/writings/homeless-story.html
===
This survivalism use-case story details how FLP is intended to work.
It is definitely worth the read, many people including some Computer
Scientists did not really understand FLP or FRDCSA until reading this
document.
---
https://frdcsa.org/~andrewdo/writings/health-story.html
===
This is another use-case story, detailing the healthcare component.
---
file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/images/free-life-planner-startup.png
===
I cannot in general show the full boot sequence of FLP because of
private information, since I am dogfooding the application, i.e. using
the program while writing it.
---
## SECTION
The PrologCyc Discipline
===
---
possible(developsAilment(proteinPoisoning,Person)) :-
isa(Person,person),
isa(Meat,meat),
hasProperty(Meat,lean).
isa(Event1,eatingEvent),
doneBy(Event1,Person)
consumedObject(Event1,Meat),
neg(
holdsIn(
timeIntervalInclusiveFn(now),
and(doneBy(Event2,Person),
isa(Event2,eatingEvent),
consumedObject(Event2,Object),
hasProperty(Object,fatty)))).
===
This is a good time to talk about FLP's usage of what I call the
PrologCyc discipline. "PrologCyc discipline" means to me effectively
following the protocols, APIs, vocabularies, etc that tools like
OpenCyc have established.
Here is a concept from the outdoor survivalism literature. What this
rule is attempting to say is that "If a Person eats lean meat, and
does not eat anything fatty along with it, it's possible that they
will develop protein poisoning."
The idea here is to use these kinds of rules as world knowledge to
constrain plans.
However, since translating this rule to PrologCyc, I have learned that
this concept about eating lean meat being potentially harmful, is
itself not necessarily correct. I will talk later about rule
provenance and trust management.
---
FLP's Knowledge-Based Systems Features:
• The current FLP KBS API features are pretty minimal:
• Highlights:
• some poor isa/2, genls/2 support
• allTermAssertions/1,2
• constant_apropos/2
• constant_complete/2
• atTime([2022-02-19,21:16:29],Prop)
• hasTruthValue/2
• many others
• Concerns:
• incomplete support for and usage of
microtheories in FLP right now
• hence no multi-user support
• no at-rest encryption of private data, etc
===
FLP has limited KBS support at present.
---
The future FLP KBS API should be more impressive:
• Talk via Pengines with Logicmoo
• Use Logicmoo's Cyc access tools
• Use Logicmoo's inference engines
• Use FRDCSA's Cyc interface
• Use FRDCSA's FreeKBS2 inference
(Prolog and FOL)
• Abduction of argIsa relations
• etc, etc, etc
===
However, it will be much better once extended, and/or integrated with
Logicmoo and or OpenCyc.
---
## SECTION
E2C, NLU and NLU-MF and Rule Mining
===
---
https://frdcsa.org/~andrewdo/projects/E2C.txt
===
A major strength of FLP is that so-called 'rules' governing life can
eventually be mined from natural language.
---
## SECTION
A.I. Planning Technologies in FLP
===
---
## file:///var/lib/myfrdcsa/codebases/minor/flp-advocacy/data-git/types-of-planning-1.txt
## ===
## Some types of planning that I intend to cover with FLP.
## ---
https://frdcsa.org/~andrewdo/writings/homeless-story/hygiene.p.pddl.LPG.sol.html
===
Here is a sample PDDL plan to tackle a homelessness scenario.
---
## file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/clips/iem2-3.mp4#t=100,120
## ---
PDDL has major limitations, such as:
• Requiring perfect information
• Inability to deal with uncertainty
• Generally unable to sense or react outside of
certain specialized planners
• Inability to fail gracefully when no plan may
be found
• Inability to create new objects at run-time
• Inability to modify the goal stack at run-time
• Inability to have nonlinear/branching plans
• Lack of inborn plan execution monitoring
===
PDDL is an extremely powerful planning language, which I use
throughout FLP and FRDCSA, however it has some limitations. Please
note There are probably exceptions to some of these cited limitations.
---
Some Metaplanners:
• Jason/SWIPL
• PUCCINI
• TAEB/Planner
• BotHack
• Logicmoo’s adv_axiom.pl
• FLUX-FRDCSA
• Andrew Gree’s metaplanner
• https://github.com/hyperc-ai/metaplanner
===
Since most PDDL planners to not seem to allow one to change the domain
or problem specifications at run time (with the exception of Andrew
Gree's metaplanner), we return to the subject of metaplanning.
---
file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/docs/209_Performatives_to_engender_the_creation_of_performatives-1.ppm.jpg
===
In order to define metaplanning, I refer to this sample document
written by Douglas Miles which describes what is intended by the term.
---
file:///var/lib/myfrdcsa/codebases/minor/flp-videos/video/resources/clips/TAEB.mkv#t=15,38
===
THE TAEB Planar AI makes heavy use of metaplanning and pathfinding for
the video game called NetHack. There is for instance a higher than
expected degree of similarity between playing this game well and
surviving emergencies such as environmental disasters or homelessness.
Both problems are roughly speaking survival-oriented pathfinding. I
therefore rehabilitated the TAEB Planar AI in order to attempt to make
use of its code for application to this real-life survival planning.
---
https://frdcsa.org/~andrewdo/archive/taeb/taeb.html
===
This article goes into great depth about how TAEB/Planar's pathfinding
works. It is very enlightening. However, I was not able to properly
harness TAEB/Planar. I have had more success with metaplanning by
focusing on Jason/SWIPL.
## BotHack:
## [Show clip of BotHack]
## Reliance on pathfinding
## Logicmoo’s adv_axiom.pl
## Andrew Gree’s metaplanner
## FLUX-FRDCSA
---
Here are some of the contemplated use-cases for metaplanning with our
autonomous Jason/SWIPL software.
---
• Help our software to carry out tasks • Copy itself onto the user's new computers • Help secure our networks • Remote control OSes • Security harden OSes • Help the user execute safe and advisable programs • Backup data and provide contingencies for it • Search all the files on the user's personal network • Handle sensor networks=== ---
• Gather software • Package software • Scrub and redact software=== ---
• Dialog with people about their situations • Monitor the health of people • Help people administer first aid • Help the impoverished survive • Plan for financial futures and contingencies=== ---
• Help ensure self-discipline • Manage distractions • Stay productive • Help people manage their mood • Help walk us through challenging situations • Avoid emotional triggers • Help people respond to domestic violence • Develop prevention and response plans for various contingencies • Conduct thorough emergency preparedness and relief (including for disasters such as pandemics)=== ---
• Browse the web and research for us • Crawl the internet and extract software and other artifacts • Process incoming downloads and forward chain with that information to accomplish more tasks • Carry out epistemic reasoning over data structures=== --- A major goal of FLP is helping people avoid or get out of proximity to traps, since it is easier to get into a trap than it is to get out. --- ## Here is a formal definition of a trap, from the book Heuristic Search: ## --- ##