Adaptive Logic for Inductive Computing

Adapt to reality with reason

2025 James B. Wilson

https://slides.com/jameswilson-3/adaptive-logic/

Law: In 2025 all passports must be

e-readable* or

be issued prior to 2020.

Your job: make the airport automated turnstiles obey this law!

 

*Fitted with NFC tags.

Equipment:

  • Scanners:

    • hard to fool,

    • Fast

    • but can go out of service

    • people can use them wrong

  • Personnel:

    • can be fooled,

    • slow

    • have authority to override

    • have a chain of command

Write an initial plan for checking passports.  Perhaps as a flowchart.

Predict Problems.

  • With the passport checking 
  • Diagram how decisions will proceed when errors arise
  • Create a Priority chart.

TSA Official

  • Want maximum security
  • Want work force respected
  • Have final authority.

Airport Manager

  • Wants maximum efficiency
  • Wants customer satisfaction
  • Can give negative report / fire on TSA official

Emergency Plans

  • There is a Tornado warning and afterwards all the passengers who sought shelter have to be re-screened but their bags are not with them.  How do you adapt?
  • There is a power outage and all the scanners go into a flashing light mode.  What logic applies?

Analize a failure

  1.  Law: have e-readable or before 2020.

  2. You scan a passport but it fails.

  3. You have an old passport, get out of line go to back of manual entry!

As sequent calculus

  • \(E\equiv\) e-readable,
  • \(O\equiv\) before 2020.

 

  1. \(\Gamma\vdash E\vee O\)
  2. \(\Gamma\vdash \neg E\)
  3. \(\Gamma\vdash_{KL} O\) by Disjunctive Syllogism \[\vdash_{KL}\frac{\neg E, E\vee O}{O}\]

2. CRITIQUE THIS OUTCOME

KL="K"lassical Logic

Re-analize in Logic of Paradox (LP)

  1. Law: have e-readable or before 2020.

  2. You scan a passport but it fails.

  3. Maybe you have an old passport, or maybe an e-readable one that doesn't scan.

As sequent calculus

  • \(E\equiv\) e-readable,
  • \(O\equiv\) before 2020.

 

  1. \(\Gamma\vdash E\vee O\)
  2. \(\Gamma\vdash \neg E\)
  3. \(\Gamma\vdash_{LP} O\vee (\neg E\wedge E)\) by \[\vdash_{LP} \frac{\neg E, E\vee O}{(\neg E\wedge E)\vee O}\]

LP we can entail \(\neg E\wedge E\)

3. CRITIQUE THIS OUTCOME

"Tri"-analize in Adaptive Logic (AP):

Use KL as long as no abnormalities.

Then switch to LP to fix abnormalities and continue in KL.

#

1

2

3

Claim

\[\Gamma\vdash E\vee O\]

Reason

Default

Condition

\[\Gamma\vdash \neg E\]

Scan

\[\emptyset\]

\[\emptyset\]

\[\Gamma\vdash_{AL} O\]

Dis. Syll(1,2) 

\[\neg(\neg E\wedge E)\]

So this is KL except at the end where we use KL and label it as "conditional" on avoiding the abnormal case of LP.

 \[\vdash_{LP} \frac{\neg E, E\vee O}{(\neg E\wedge E)\vee O}\]

type passport_status =
  | EReadable
  | IssuedBefore2020
  

type scan_status =
  | Checked(checksum)
  | Failed

let classify_passport ( 
	scan : scan_result ) : 
    maybe passport_status =
  match scan with 
  | Checked(checksum) -> just EReadable
  | Failed -> print "If you passport is new than 2020"
  			  print "clean scanner and retry;"
              print "else go to manual line."
              none

New event: 

officer comes over,

cleans the scanner,

you rescan this time it works.

4. Add 4th row, and derive its consequences in KL

"Tri"-analize in Adaptive Logic (AP):

Use KL as long as no abnormalities. \(\Gamma\)

Then switch to LP to DEFEAT abnormalities and continue in KL.

#

1

2

3

4

5

Claim

\[\Gamma\vdash E\vee O\]

Reason

Default

Condition

Feasible?

\[\Gamma\vdash \neg E\]

Scan

\[\emptyset\]

\[\emptyset\]

CONFIRMED

\[-\]

\[\Gamma\vdash_{AL} O\]

Dis. Syll(1,2) 

\[\neg(\neg E\wedge E)\]

\[\Gamma\vdash E\]

Scan

\[-\]

\[\Gamma\vdash_{KL} \neg E\wedge E\]

And (2,4)

\[-\]

DEFEATED (5)

\[-\]

\[-\]

5

\[\Gamma\vdash_{KL} E\vee O\]

OR (4)

New Code

...

let classify_passport ( 
	scan : scan_result ) : 
    passport_status =
  match scan with 
  | Checked(checksum) -> just EReadable
  | Failed -> print "If you passport is new than 2020"
  			  print "clean scanner and retry;"
              print "else go to manual line."
              rescan( scan )

let rescan( previous : scan_result ) :
    passport_status =
  match new_scan() with 
  | Checked(checksum) -> EReadable
  | Failed -> IssuedBefore2020

New event: 

as you leave the officer does the same for another traveller, but this time the scan is still false, and the passport is after 2020!

5. Revisit the table at 4, and derive its consequences in KL

"Tri"-analize in Adaptive Logic (AP):

Use KL as long as no abnormalities. \(\Gamma\)

Then switch to LP to fix abnormalities and continue in KL.

#

1

2

3

4

5

Claim

\[\Gamma\vdash E\vee O\]

Reason

Default

Condition

Feasible?

\[\Gamma\vdash \neg E\]

Scan

\[\emptyset\]

\[\emptyset\]

DEFEATED (5)

\[-\]

\[\Gamma\vdash_{AL} O\]

Dis. Syll(1,2) 

\[\neg(\neg E\wedge E)\]

\[\Gamma\vdash \neg E\wedge \neg O\]

Scan

\[-\]

\[\Gamma\vdash_{KL} \neg (E\vee O)\]

De Morgan (4)

\[-\]

\[-\]

\[-\]

6

\(\Gamma\vdash\) No Entry

Defeated law

\[-\]

\[-\]

\[-\]

List your defaults; then order them

  • D1: One negative scan denies entry

  • D2: One clean scan allows entry

  • D3: Agent can allow/deny entry after inspection.

  • If D2>D1 then rescan may allow entry.

  • If D1>D2 then rescan might not allow entry, requires agent.

 

You should articulate your defaults and their order with your client.  After that the software can take over and guide the defaults according to the rules, possibly defeating earlier logical deductions.