--- layout: ../Site.layout.js --- # screwlisp's introduction to software-individual knowledgebases Two things we never, ever want to do is writing memorized paths into a user interface, or else touching, juggling and searching data files by hand. On the other hand, computer programs are symmetrically adept at both of these, as long as they do not have to deal with a human having hand-broken its conventions. [Enter my (continuation of Erik Sandewall's) software-individuals](https://codeberg.org/tfw/pawn-75). Each software-individual independently creates, loads and persists data including stubbing lisp program locations. Its data are in a lovely human-perusable report-style ascii format that a human can directly edit the data of whether lisp programs or other values, though the human should mostly not want to step on the software-individual's toes about structuring these files. Put another way, software-individuals provide an interface for both humans and other software individuals into persistent knowledge representation. For [my lispgamejam submission](https://itch.io/jam/spring-lisp-game-jam-2025/topic/4858711/what-genre-is-simulation-eat-things-or-you-die), I want a sort of complex game-of-life world to be persistent and interactable, and propagatable forward through time. Instead of trying to invent a system from scratch, or farming it out to an external C library or C++ programs, or worse, a rented web service, I am introducing my game as knowledge to a new software-individual. I previously [introduced cloning a fresh software-individual and connecting to it in emacs here](../../programming/my-own-eev-eepitch-emacs-intro) so I am not repeating that again. I am starting with eepitch pointing at my software-individual like that link presents setting up. Well, actually here is my connection again since I need to connect right now anyway: ```  (setq inferior-lisp-program "clisp -E ISO-8859-1 -modern")  (slime)  (setq eepitch-buffer-name "*slime-repl clisp*") (require "asdf") (uiop:chdir "~/leocommunity/Plant-insect-individual/demus/Process/main/") (load #p"../../../remus/Startup/cl/acleo.leos") (cle) ``` ## Creating a knowledgebase for my plant-insect lispgamejam game Here is the initial prompt after starting my new Plant-insect-individual: ``` Starting or resuming interaction using the CLE command-loop **************************************************************************** ses.001) ``` Now while I can type there, I prefer to eepitch from this md file. Let us create two knowledgebases and set one of them as active. ``` crek simulation-base-kb crek active-simulations-kb ``` first being the base of knowledge defining the game-of-life style simulation, and secondly a knowledgebase to hold the persistent state of ongoing simulations. My cursor is not leaving this md file we are authoring, but here is a peek at what is happening in the other half of my screen (or where-ever): ``` ses.002) crek simulation-base-kb Load-ef: kb-catal at Defblock/kb-catal.leo ;; Loading file ../../../remus/Process/main/Defblock/cl/kb-catal.leos ... ;; Loaded file ../../../remus/Process/main/Defblock/cl/kb-catal.leos writeloc-file-leo: Defblock/kb-catal.leo writeloc-file-leos: Defblock/cl/kb-catal.leos writeloc-file-leo: ../../../demus/Simulation-base/simulation-base-kb.leo writeloc-file-leos: ../../../demus/Simulation-base/cl/simulation-base-kb.leos ses.003) crek active-simulations-kb Load-ef: kb-catal at Defblock/kb-catal.leo ;; Loading file ../../../remus/Process/main/Defblock/cl/kb-catal.leos ... ;; Loaded file ../../../remus/Process/main/Defblock/cl/kb-catal.leos writeloc-file-leo: Defblock/kb-catal.leo writeloc-file-leos: Defblock/cl/kb-catal.leos writeloc-file-leo: ../../../demus/Active-simulations/active-simulations-kb.leo writeloc-file-leos: ../../../demus/Active-simulations/cl/active-simulations-kb.leos ses.004) ``` Note that I am not personally writing any of that. Further, software-individuals are metacircularly defined and have first class access to how they themselves work: I am not trying to remember or reproduce that in my brain or knowledge contributions moment to moment. ## Telling `active-simulations-kb` that it `mustload` (i.e. depends on) `simulation-base-kb` ``` loadk active-simulations-kb setk active-simulations-kb put active-simulations-kb mustload {simulation-base-kb} writefil active-simulations-kb loadk active-simulations-kb ``` And we can see in the other half of our screen: ``` ses.013) loadk active-simulations-kb Load-ef: active-simulations-kb at ../../../demus/Active-simulations/active-simulations-kb.leo Load-ef: simulation-base-kb at ../../../demus/Simulation-base/simulation-base-kb.leo ses.014) ``` so we added the knowledge that `active-simulations-kb` first `mustload` the `simulation-base-kb` when it is `loadk`ed. ## What the persisted knowledge looks like ``` --------------------------------------------------------- -- active-simulations-kb [: type kb-index] [: latest-written "2025-05-16/01:15.+12"] [: contents ] [: mustload {simulation-base-kb}] [: preferred-directory "Active-simulations/"] [: nullvalued {purpose namephrase requires removed-entities uses-hostcommands codefiles profile overlay-on overlay-types overlay-own hostinfo indivinfo onto-amend leos-use dont-display sections local-ents latest-archived-entity archivepoint-sequence attrib-converted latest-rearchived}] --------------------------------------------------------- -- active-simulations-kb-properties [: type loadtime-operation] [: latest-rearchived nil] (progn (setf (get 'active-simulations-kb 'init-startup-proc) #'(lambda nil nil)) (setf (get 'active-simulations-kb 'end-startup-proc) #'(lambda nil nil)) (setf (get 'active-simulations-kb 'exit-proc) #'(lambda nil nil))) ooooooooooooooooooooooooooooooooooooooooooooooooooooooooo ``` I guess you can see the `mustload` line in there. `--------`s separate `entities`, and `ooooooo`s indicate the end of the `entityfile`'s `entities` (if you put something below the `ooo`s, it is not inspected or loaded in any way). # Summary We `crek`ed (created) two knowledgebases. We `put` a new `mustload` property value in the `entity` defining the knowledgebase being a `{set, indicating}` that `active-simulations-kb` needs to have `simulation-base-kb` loaded before it itself loads (from `loadk`). These `mustload` dependencies between knowledgebases are the obvious web of knowledge inside of one `agent` inside of one `software-individual`. There is not a communication protocol per se between knowledgebases within the `agent`. We are just using the sample-mostly-empty-agent `demus`. # Talk on the Mastodon In [this toot thread here](https://gamerplus.org/@screwlisp/114515071813187224). # Recent knowledge-based-programming adjacent interview with Kent M Pitman on the show [Kent Pitman #interview #unpublished #CREF #LISP #programming #history #computerscience ](https://communitymedia.video/w/gUXEKmEnQcamtg4EZk45Un) Literally only thirty people have downloaded the archive before you. The very definition of a treasure.