BASIC AI by Kenneth Udut 10-09-2015 AI Define input device. Initialize input device. Check ready state of input device. Define processing area. Initialize processing area. Check ready state of processing area. Define storage area. Initialize Storage area. Check ready state of storage area. Define output device. Initialize output device Check ready state of output device. Define data types Define anticipation subroutine [Anticipation subroutine takes expected data from storage] Define IF MISMATCH ERROR subroutine. All ok? Start anticipation subroutine. Expectation found Y/N? Retrieve expectation and place in processing area. Open input device for data types. Error Y/N? Send input to processing area. . NOR (or XOR) expectation and received data. If 0, do nothing. If not 0, send cognitive dissonance to IF MISMATCH ERROR subroutine. IF MISMATCH ERROR: search storage area for input match. If none found, search storage area for metaphorical match to input decide: Accept metaphorical match Accept contradictory input Reject contradictory input Reject metaphorical match If accept, learn something. Send anticipation-mismatch-input-metaphorical match to storage in a single packet and store with metaphor. If reject, make a loud complaint via output device about how the world isn't right.