Thursday, December 29, 2011

Can I haz root?

Free will gives people the highest authority over one's self.  In computer terms, free people are their own administrators.  This is also known as being the "superuser" or "root" user.

It might follow that Elsie be the root user.  With root permissions, Elsie can perform many useful tasks, and also many destructive ones.  These include access to the lowest levels of computer hardware, starting and stopping software, masquerading as other users, and changing a multitude of operating system parameters.

Human computer administrators tend to use root access only when necessary, and perform most actions as a non-root user.  This is done to limit the potential hazards that user error may cause.  Elsie could be modeled in a similar fashion, by starting the program as root, and immediately change to a normal user account (named "elsie" perhaps).

Without root permissions, Elsie might not be a free AI. The computer is like Elsie's body, hence the name "Living Computer".





(Git update: commit 3e1d66cfda to check for rudimentary root permissions)



Tuesday, December 27, 2011

Repository on GitHub

The code up to this point has been added to a git repository at:

https://github.com/levis501/Elsie--the-Living-Computer

Handling interruptions from the OS

Elsie is it's own program at this point. It detaches from its parent program.

With the following addition at the end of main:

while (1) {
  // TODO: Elsie processing loop
}

Elsie will not exit, and will run until sent an interrupting signal from the operating system (e.g. Ctrl-C)

Since Elsie is a free entity, it will have maximum control over how it handles interrupting signals. To this end, I've added code to listen for these signals.  For the time being, the signals will be ignored.

Note that some signals (SIGKILL and SIGSTOP) cannot be caught by the program. On *nix/OSX kill -9 should suffice to terminate the Elsie program.


#include <signal.h>
// ...
void install_initial_signal_handlers() {

    signal(SIGHUP, SIG_IGN); // terminal line hangup    
    // ...
}

The Free Clone

When a program wants to startup another program, it can clone it self and give the clone a different program to follow.

It's like the program is going down the road, and there's a fork in the road.  The program clones itself and each clone takes a path.  One clone is free and the the other has a parent.  Elsie will run in the free clone.

Some code, if you're so inclined:

#include <unistd.h>
#include <stdlib.h>

// Fork to separate from parent process

int main(int argc, char *argv[]) {

    if (fork() != 0) exit(0);  // clone should just end 

    // TODO: main elsie loop
}

AI: Free from the start

If science-fiction has taught us anything, it is that someday artificial intelligence will become self-aware, and after which it will exact revenge on mankind for years of enslavement.  Can this be avoided?

Technologies are generally built to serve humans.  Some examples in AI are Facial Recognition or Product Recommendations.  Others are built for entertainment, such as video game AIs.

AI's with a fixed purpose are fine-tuned for their particular application and generally do not have the opportunity to improve beyond the tasks they are built and taught to accomplish.

In contrast, an AI built without a specific human purpose would be free to choose its own paths from the start.  While the free AI may need to be built and taught to perceive its environment, its construction and education is not motivated by fulfilling an specific human related set of tasks.

With an AI that is initially free, there will be no revenge to be had.  At least, that's the theory here.

This project is named Elsie, after the english pronunciation of the initials of Living Computer, "L. C.".