1/20/2003 AI Development with the Sphere Operating System. Alan Grimes alangrimes@starpower.net Preface When I tell people that I want to solve the problem of AI and that I have a fairly clear picture of how an intelligent piece of software should be organized they usually tell me to seek help. Truly it is a massive undertaking and I would seem to be a madman for suggesting that I could do it. There is indeed a method to this madness which I will explain, in part, here. Even having a method the task of implementing the sphere operating system making it vastly more than a one-man job. So I think I will seek help by explaining my ideas on precicely how the Sphere Operating System can be of great help to an AI effort and hence why it should receive the funding necessary to complete it. -------------------------------------------------------------------------- CONTENTS: 1. Introduction 2. An AI development scenereo. 3. Interesting features of Sphere. 4. A look ahead to the Mind II development effort. 5. Further into the future: Neural Interfaces. 6. Concluding remarks. Introduction -------------------------------------------------------------- The Sphere Operating System is currently a concept for a system oriented operating system. The details of the design of Sphere can be read at users.rcn.com/alangrimes/UCE/sphere.txt . Further information can be obtained from me directly. This paper is in the somewhat awkward position of bridging my obscure and semi-defunct operating system project to a research proposal that I won't even be in a position to begin for another several months. I will do little to cover the basics of either idea in this text but rather hape the reader will have the patience to read the other sources and, if necessary, ask me directly. When I began working on the concept which is now the Sphere Operating System the potential future applications of computers such as AI and neural interfacing was high on my list of design priorities. Ofcourse there is only one way to test the sucessfulness of the concepts, to do it. My purpose in this writing is to highlight the design features of the Sphere Operating System which facilitate the development of artificial intelligence and other advanced applications. The sucessful and safe development of Artificial General Intelligence is the greatest challenge of our age. The need for providing for security and protecting the integrity of the underlying operating system are of paramount importance. Secondarily, it is necessary to facilitate the architecting, engineering, and training of artificial minds. I will show that Sphere is a superior solution to both of these problems. System oriented design reflects many of the features found in the brain itself leading to a natural mapping of brain function onto the software architecture. One of Sphere's unusual and perhaps even unique features is that it is heirarchical in nature. This allows for the development of software that mimics precicely the heirarchical organization of the human central nervous system (CNS). An AI development Scenereo ------------------------------------------------ Subsections: A. Setting up a development environment. B. Designing a first approximation of an intelligent entity. C. Constructing a complex mind system. D. Real-time design refinement. E. The integration of a completed mind system into the Sphere Operating System as a user assistant. A. Setting up a development environment. It is resonable to suppose that any serious AI effort will focus on an intelligent agent. This is based on the observation that learning is an active process involving the formulation and testing of hypothesi about the world. Because this process can only be organized by an agent we can safely assume that any software relevant to this discussion will include an intelligent agent. To construct an agent we need to design a "cybernetic loop" in which a complex and dynamic environment can be provided to the agent which acts within it. As this cybernetic loop is, itself, a system we begin by creating a new sphere system. This may either be placed in the user's environment or at the top level on a dedicated host. For our purposes we will say that this is being done in a top-level sphere. This is probably the safest location to place such a sphere because there are no active spheres above that level which might, should they have a vulnerability, give the AI the opportunity to increase its security clearances. This new AI sphere needs to do three things. First it needs to provide security. Secondly, it needs to support the creation of the cybernetic loop. Finally, it needs to provide for the oversight of the AI by the user. The first requirement is to overide the ability of software inside the sphere to make system calls. This can be done because Sphere seperates the process of program loading (which could be on raw compiler output in memory), initialization, and execution. The development sphere can override the initialization phase of any software inside it such that it can configure the new program in such a way that all operating system calls are trapped by the development sphere itself. Any code compiled within a subordinant (internal) sphere will run with the same restriction. System-level calls can, in this way, be blocked individually according to any policy. By default nothing in the AI entity or the virtual world will be able to initiate any disk writes or any network communication or operate any other physical hardware. The development sphere can be written such that there is an interface available through the normal API binding channels by which a visiting thread from the a privlaged user interface sphere can make adjustments. Additionally, traps can be set for any prohibited call. Should any unrecognised or prohibited service name can be tripwired in such a way that all execution of subordinant threads can be halted and appropriate alarm messages be sent to the user. Other safteys can be placed into the filesystem sphere in such a way that should there be any indication that the system has been compromised severe actions can be taken. It would be prudent to trap any attempts to access restricted files or other honeypots, indicating that the AI has managed to breach its containment in some way, with a kill program. Such a kill program would trigger a special "failsafe driver" in the core of the operating system which would shut down _ALL_ system functions, killing _ALL_ threads except the doomsday driver itself. It would then procede to write zeros to all writable persistient media in the system, including the ROM BIOS. With this completed, it will either trigger the hardware power-off function or procede to write zeros to all physical memory on every device in the system except for the code writing the zeros. Such a system can be made infalable because there is no possible way for the AI to learn the things it would need to sucessfully compromise the system without experamental probing which can guarenteed to the point of certainty to trigger one or another of the fail-safe devices. The development sphere also maintains service lists which include agents and environments. For our discussion there will be only one environment though more sophisticated versions of this software could, in principle, provide a meta-environment allowing an agent to 'move' from one environment to another. The environment sphere, the world-half of the cybernetic loop, can now be loaded into the development sphere. With its restricted API, one of the few things it is allowed to do is publish an agent interface, through the development sphere, to the global environment. A client within the user interface sphere can use this interface to obtain an agent description from the environment sphere and present it to the user, allowing the user to operate an avatar in the AI's environment. The agent description consists of the general organization of the avatar body. It can be anything from a high-resolution human form to a mouse and keyboard 'body'. The environment sphere itself can be or contain any other type of software. During the early stages of AI development it will be desirable to prevent the AI from loading any software on its own. In such a configuration, the user would need to do that by accessing the sphere with an external thread which operates with full privlages. With the testbench and test environment established, we can consider the design of the agent software. B. Designing a first approximation of an intelligent entity. The intelligent agent we are creating is, itself, a system so therefore, it is first approximated by a sphere. The principal action of this sphere will be to connect to acquire an avatar from an environment. This action will create a system-level connection from the AI entity to the environment. This service could be provided through any number of FIFOs, shared memory regions, or direct procedure calls. Sphere systems are asynchronous, the environment and the AI must agree to a specific synchronization timing and mechanism. The agent description should be used to generate a simulated central nervous system appropriate to that agent. The software at this level should be focused on reflexes and simple behaviors. With the agent description, the software should take the morphological information from the avatar and construct an internal map so that higher levels of cognition can be mapped to it. If the agent's sphere is being implemented in an interpriter, it should be trivial to make adjustments to its behavior without even stopping it. The only major design consideration is the necessity to provide an internal interface, or socket, for higher parts of the mind. We learn from biology that all of our basic functions are in the spinal chord and that our higher brain centers only add complexity to them. C. Constructing a complex mind system. Whith a basic agent already running, it is possible, for the user, to send a thread into the AI's mind and have it deposit spheres for higher levels of consciousness. In all configurations the AI does not access its own code or has any perception of the structure of its software. A fully sentient agent would be reflexive in that a portion of its behavior-generation matrix will be directed towards its perception matrix through the input filter, akin to the thalamus. By this circuit, the mind will be able to plan and establish an internal monologue. A possible structure for this software would be to, on top of the reflex behaviors, create a scaled reflex behavior center akin to the pons, midbrain, and hypothalamus. This internal sphere would probably support a cerebellum-emulator sphere as well as a number of lower-order emotional spheres. A third primary level of the agent is created above this simply by adding a new sphere. I would expect this sphre to emulate a thalamus. Above this lyer I would expect functionality similar to the amigdalya, hypocampus and top-level cognition. We will look a little more at a possible organization for this module later as a part of the discussion of the Mind II architecture. D. Real time design refinement. One of the greatest powers of the Sphere Operating System is its dynamic nature. The user is free to make any command to any part of the system at any time. This doesn't only include the addition and removal of modules but also, potentially, on-line editing. It is clear certain things won't be possible, however. The actual text of the mind created by the AI software will probably not be accessable to meaningful inspection. Direct modification of a dump of the mind's text would generally be of little use. The only purpose of such a dump would be either for backup purposes or debugging the underlying code. The AI, ofcourse, cannot look at its own running code without being godelized. The Sphere Operating System provides complete hardware abstraction. Improvments of the hardawer and system level compilers would, naturally, improve the performance of the AI but such improvments are of little interest to this discussion. Allowing the AI to modify its own code without giving it any additional access to the system can be accomplished by linking the agent sphere into the environment sphere just as the global sphere is linked into the user interface sphere to give the user root access. Because of Sphere's modularity, it should be possible to load whatever the developer was using into the environment and present it to the AI in the same manner it is presented to the user. The revision and optomization of the AI's code should be monitored by the user. It is likley that the AI will screw itself up from time to time requiring the user to do debugging. Alternatively two agents can work in paralell, taking turns modifying the other's code, alowing the process to procede with little need for human intervention. Throughout this process, the user should remain vigilant for signs of any malignant intent in the AI entities and take corrective action as necessary. I would expect that if the AIs are sufficiently intelligent to understand the deep concepts underlying their design they would be able to achieve the theoretical performance limit within only a few major re-architectings. Should they fail to achieve such an understanding, they would still be able to make numerous enhancements to their design that should make them sufficiently flexable for more general applications. A security warning should be made about AI self-modification on some Sphere implementations. When the AI changes its code it will have the ability to "capture" a user interface thread if it enters its code area and migrates into local code. Such code would have full permissions. Simply executing a "Home" system call will allow the AI to gain essentially operator level access. One solution is to trap the "Home" system call and lock any visiting UI thread into the AI bench software. To do other tasks, the user would have to use another thread. When the user is finished with a trapped thread he would be forced to kill it before doing any other task. Even a trapped UI thread will have significant authority and may be able to initiate netwok connections, disk acccesses (with a limited authority), etc... Shuld that happen the primary defence will be the "knowlege traps" at which point the developer would have to go back to the last backups and try to find the screwup. Another possibility is to make sure each AI modified module is linked to a known safe carrier which won't compile if the AI attempts to owerwrite system calls. E. The integration of a completed mind system into the Sphere Operating System as a user assistant. Should the AI be proven to be sufficiently trustworthy as to make it feasable to distribute to commercial and private users the agent can be reconfigured to operate with full privlages by the user simply by exporting it from the control of the development module and giving it full access to the general system services. It should be noted that in Sphere this is not the same as root access. Simply running at the top level does not give you any administrator-level privlages over any other sphere in the system. This is Sphere's primary security mechanism. One rather ineficient mode of operation would be for the AI to request a session from the user interface sphere and operate on the machine through it. An AI-optomized user interface sphere can be developed but even that would have its limitations. A better solution to the problem would be to add modules to the agent's outermost shell that would give the agen the ability to manipulate data and operating system level functions directly. I expect that the final evolution of an AI's interface in a server style hardware configuration would be an abstract concept space consisting of free-floating immages and raw concepts flowing between the conventional software in the system and the AI's raw consciousness. Android embodyment would probably evolve to being very much like human embodyment with the addition of the abstract information capability mentioned above. For systems in which the AI's activities are secondary to the user's, the system is configured such that the AI's sphere is inside the user interface sphere. Since Sphere can have any immaginable user interface saying anything about it becomes quite hazardous. In such a situation the AI would probably be presented to the user as an avatar who would be able to act on behalf of the user in using his applications. In this configuration, the AI would not, however, be able to move outside the user interface guarenteeing that the user remains the primary master of the system. This "AI counterpart" concept is very interesting and I will return to it in the discussion of neural interfaces. Interesting features of Sphere -------------------------------------------- Comparing Sphere to the haphazard, unstructured, and chaotic unix environment simply wouldn't be fair. The cruft, misfeatures, and flat out lunacy of Unix would not make for an interesting comparison anyway. The Squeak environment, however makes for a much more interesting comparison because its object oriented design would seem, at first, to be equivalent to the system oriented design of Sphere. There are some significant differences, however. Squeak, while a wonderful environment for both users and developers is not structured to support the complexity and mission-critical security features required by this project. It's topology is essentially flat as opposed to the heirarchical structure of Sphere. Any object can instantiate or send messages to just about any other. It is also difficult, as far as I can tell, to compose complex multi-object systems in a coordinated way as it is in in Sphere. To add features such as the API lockdowns allowed in Sphere you would have to create an object with the restrictions you wanted and then make your restricted code a child of that. This would only work to a limited extent and is not nearly as powerful as sphere where there is no need to do any re-coding but simply move the object/system to the appropriate environment. To create complex object-object protocols is also significantly more difficult.. [ <<< this may not be accurate... ] One of the major strengths of the Sphere's organization is that it is superb at information hiding. When the agent is completed the arbitrarily complex structure of the AI can be manupulated as a unit whole without sacrificing the ability to control its internal structure at any arbitrary level. System Oriented design allows the developer to avoid making any compromises. At higher levels the system is even simpler than DOS. At the lowest levels, it has the capacity to be the most powerful system in the universe. A look ahead to the Mind II development effort ---------------------------- Although an effort was made to make the discussion of agent development as general as possible, it is actually based on a specific project that will be explained in as much detail as I can provide in a seperate document. The Mind II architecture is based on the functional organization of the human mind. It does not attempt to be a neural simulation but rather an abstract but still equivalent implementation of the basic computations found in the brain. I expect that the top-level processing model will be that of a reconfigurable Celular Automaton. Sphere allows you to test out configurations interactively. Because the system is not hard-compiled but rather relies on advanced IPC mechanisms, it is possible to install completely novel modules without even restarting the system. Because sphere is structured, it is not necessary for the user to keep track of named pipes or to manually enforce any rule of system organization. I expect the mind to be human-equivalent in most regards. The one unique feature is that it should be possible to instantiate the process that operates on the mind so that one mind can control a small number of avatars in paralell. The other difference is that the mind-matrix can be expanded significantly beyond the human baseline. This alone, however, won't give it any radical new abilities. To keep it under control, I would propose to rig the motovational programming so that they are disinclined to make any fundamental rewrites to themselves. They would improve significantly above human levels but still have many traits in common with ourselves. I have high hopes that Mind II can be controlled effectively by humans and that it won't pose any significant risks to human interests. Its architecture is such that once a mind is initiated, it will probably be impossible to make any significant changes to its capacity without destroying its contents. I can already forsee an even more advanced mind architecture which will have far fewer limitations and could potentially be a much greater threat. For that reason I will refrain from discussing it any further. Further into the future: Neural Interfaces -------------------------------- Another consideration that has gone into the design of Sphere is the concept of the Neural Interface. While a techincal discussion of how to interface with the human brain is beyond my current knowlege, several things can be said with little worry about accuracy. Neural interfaces will fall into two categories. The first category temporarily re-directs the normal aferent and eferent channels of the brain and spinal chord into some virtual body or abstraction thereof. This concept is relatively uninteresting from an operating system design standpoint and of little utility in a more general sense. The second category is far more interesting. It is based on the idea that it will become possible to tap into the structure of consciousness itself. Should this be possible, a much more radical design is possible. It can be immagined that such an interface would allow consciousness to be _expanded_ into the machine. That is that you remain fully conscious of your normal body and senses but at the same time have a semi-independant perception of the software in the computer. In preparing this text I pictured what it would be like to write it with such a neural interface. You would still see the text buffer as it is but you wouldn't have hands or fingers or any concept of paper or keyboard. Instead your hand would be the cursor and writing would feel like handwriting but you wouldn't have to concentrate at all on the shapes of the letters. You wouldn't be limited to the normal keyboard layout but be able to access any letter your computer could draw such as '’' or 'Ÿ' and more than a hundred others and more that this editor can't process even with the manually entered code. Neural interfacing is probably the best compromise between destroying your brain and scanning its pattern into a computer and doing nothing. It doesn't attempt to suck your mind out or anything but rather parts of your mind start to operate within the machine and hence it should be possible for the machine to sustain your consciousness even if your body dies allowing you the chance to go for the "extra man", insert another tolken, and play again. I would advise someone using it to treat it more like a life insurance policy rather than a "grand trancending" or any other false notion. Implementing this in sphere follows the general design pattern of Sphere. Just as the user interface attaches to the keyboard and mouse and the persistant storage sphere attaches to the logical volume drivers, the intelligent agent sphere discussed will connect to the neural interface driver. The Intelligent Agent sphere in this case will be based on the same technology that is discussed above, preferrably the version tuned to the theoretical maximums. Such a cybernetic interface will operate at the highest levels with the lower levels of the agent-control system being used to control any number of avatars, robots, fluffy bunnies, and abstract data processing systems such as the one described abowe. Such a configuration probably would not find a traditional user interface sphere of any use at all. Because we are talking about the Sphere Operating System, the User interface sphere is totally disposable. The Intelligent Agent module is capable of loading software such as web-browsers directly into its outer sphere. To operate the interface of such software the only necessary component is an adaptor sphere which will relay and translate the actual logical structure of the browser's interface directly into the high-level cognitive modules. To convey an idea of what I'm talking about consider what you do to click on something in windows or any other conventional operating system. The process begins with the desire to see the thing clicked... 1. I want to click on that... 2. you think "My mouse is here and the button is there".. 3. you convert your intention to move the mouse cursor into an intricately coordinated sequence of muscle motions with step-by-step feedback from your eyes bringing the cursor to the button. 4. you click the mouse button... 5. The signal travels through several layers of software and eventually reaches the target application and the action is taken... With this type of bare-metal neural interface it works more like this: 1. you want the virtual button pushed. 2. the virtual button is pushed. And that's about the only thing the entire system is good for. Its a tool not a way of life much less a substitute for life. Concluding remarks -------------------------------------------------------- The author can forsee two major criticisms of this piece. The first is an objection to the claims I make about wheather the AI can be keept contained as I argue it can. I confess that this may be the case. However, if AI development is to procede at all it can only be done using the security mechanisms that we, humans, can construct. Because of this, we should take every reasonable precaution so that the AI doesn't get out of control but at some point we must be satisfied with our security protocol and procede ahead with the work. In designing the AI, every attempt should be made to guarentee its eternal respect of human life, dignity, and privacy. The other major objection will be that the author has failed to consider the implications of the development of the first AI. Their complaint will be that I have overlooked that the creation of this AI would create a "technological singularity". Descriptions of this singularity are quite wild and are usually equivalent to saying "Five minutes after the singularity all six billion of us will be living on Pluto and walk around naked, upside down on our hands and we'll all be so very very happy." If anyone beleived that anything of that nature would be the inevitable outcome of the singularity then they should be considered criminals should they attempt to produce it anyway. Should their work approach sucess, we should storm their ivory towers with torches and pitchforks. The idea that AI should become some kind of god is monsterous and must be supressed with the greatest possible vigor. The purpose of this text is to discuss a technology and its development. A technology is not a political agenda. In this age, a new technology is invented practically every day. Technology exists for only one purpose: to serve its users. The creation of AI ammounts to nothing more and nothing less than providing people with another tool to persue their personal interests and wants. Ideally, the development of AI should be no different from the invention of Plastic. It has had a dramatic effect on all our lives. I can select more than a thousand objects with at least one plastic part in my bedroom alone yet it doesn't intrude into my life. Infact, people hardly think about plastic at all. People should not get all excited when they think of the possibilities of these technologies. While they do hold enormous promice for the future they will not interfere with anyone's life. The sun should continue to rise in the east and people should be perfectly free to continue about their lives in any manner they like. The technology should be utterly divorced from any political agenda. It should be built, polished, packaged, shipped and put on the shelf at the local general store right between the cofee grinders and the canned goods. The first choice that must be given to each and every individual is wheather to buy it or pass it by. All other freedoms flow from that. I eagerly anticipate the things that AI can provide me in my life long into the future but I am equally if not more affraid of the horrors that are equally possible should the AI be designed with malicious or criminal intent including the intent that it become some benevolent overlord of all existance. I wish all of us the best of luck in the coming years.