Ai Dreams Forum

Member's Experiments & Projects => General Project Discussion => Topic started by: lrh9 on August 23, 2009, 09:10:25 pm

Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on August 23, 2009, 09:10:25 pm
Still working on my script. In the a.i. brain I still have a couple dozen functions to write and polish. Some range from a simple couple of lines to a page or more of complex code. Thankfully there are more of the former than the latter. In addition I may have to add things I haven't designed or thought of yet, but those should be few.

Then I'll have to work on the manager system, security system, and environmental interface system. Right now there are four unique functions planned for the manager systems, and one or two functions in the a.i. brain that will be needed in this one two. Luckily I can copy and paste those. The environmental interface script hasn't had any deep planning yet. It will be the largest script. However, the component functions will probably be small for the most part. Then there is the security system. That needs some major work too.

Right now I'm worried though because I've thought about how I'm going to build the program, but I haven't the foggiest about how I'm going to teach it. I should probably think about that before continuing. What do you all think?
Title: Prometheus A.I. News and Development Updates
Post by: Art on August 23, 2009, 11:08:30 pm
Teaching? Ahh...teaching...

"As the twig is bent, so shall the tree grow."

I digress...

Teaching other bots has often been accomplished by having them:

"read" / process a text file
Talking to / with it over time - this assumes a breakdown of subject / verb / sentence structure happens.
loading in large amounts of prescribed data
Hard coding everything you want it to know as a basic core
Construct algorythms that allow it to sort things out for itself and according to your parameters and "self learn".

Some bots can perform a few of these but not necessarily at the same time. You might consider building in options
that would allow for a variety of methods.

Personally, even though it's off the beaten path a bit, I'd love to see someone develop an "Intelligent" program that
would or could interface with say Girder or any other Home Automation program (Insteon, X-10, Z-Wave, etc.). The
person could have a two way conversation with his "house" or it's AI entity to carry out various tasks based on the user's
wishes and it's own logic (ie. if it's summer and afternoon and room temp is > 78 degrees then close drapes and turn on
air conditioning until temp reaches 72 degrees or simply turn on ceiling fans).

The technology is already there and the only main stumbling block is the speech recognition through out the whole house.

Sorry to get off track with your posting but thought I'd throw it out in case any might be interested.

Thanks!
Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on August 24, 2009, 06:09:18 pm
Teaching? Ahh...teaching...

"As the twig is bent, so shall the tree grow."

I digress...

Let's hope I don't teach it the wrong way then.

Teaching other bots has often been accomplished by having them:

"read" / process a text file
Talking to / with it over time - this assumes a breakdown of subject / verb / sentence structure happens.
loading in large amounts of prescribed data
Hard coding everything you want it to know as a basic core
Construct algorythms that allow it to sort things out for itself and according to your parameters and "self learn".

Some bots can perform a few of these but not necessarily at the same time. You might consider building in options
that would allow for a variety of methods.

Yes. The program will be capable of reading and writing from files, downloading files from the Internet, displaying GUI's, interacting with windows, interacting with the mouse and keyboard, and obtaining user input. It might also be capable of voice recognition. I want to shy away from pre-coded knowledge. This project was all about creating something that could learn through interaction with the environment.

Personally, even though it's off the beaten path a bit, I'd love to see someone develop an "Intelligent" program that
would or could interface with say Girder or any other Home Automation program (Insteon, X-10, Z-Wave, etc.). The
person could have a two way conversation with his "house" or it's AI entity to carry out various tasks based on the user's
wishes and it's own logic (ie. if it's summer and afternoon and room temp is > 78 degrees then close drapes and turn on
air conditioning until temp reaches 72 degrees or simply turn on ceiling fans).

The technology is already there and the only main stumbling block is the speech recognition through out the whole house.

Sorry to get off track with your posting but thought I'd throw it out in case any might be interested.

Thanks!

Sorry. My aims are not towards home automation at this point. (However, I am working some with voice recognition.) It will happen one day though, so keep your fingers crossed!
Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on August 24, 2009, 06:38:49 pm
However, there might be hope for your ideas for home automation. If it is interfaced with software on a Windows PC, I think there should be no reason why my app couldn't interact with it.
Title: Prometheus A.I. News and Development Updates
Post by: Freddy on August 25, 2009, 08:11:53 pm
Irh9, I read the details with interest.  It seems a big project.  Do you have commercial plans for it or will it be open source or something of that nature ?

Reading from text files sounds good to me too btw.. and whatever it can learn from the internet - I think I would go for something that will surprise me with what it has learnt.
Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on August 25, 2009, 11:12:41 pm
I do want the opportunity to make some profit off of it. I have bills to pay. However, I couldn't call it a humanitarian effort (which it is) if I charged money for all of it. So what I'm thinking about doing is setting up tiers of service, and charging for higher level tiers. What I've thought about is allowing the base program to be free, and requiring people to pay for ability modules (not the basic programs abilities, but complex operations that it has learned or been taught), or allowing people to buy the program and get unlimited or cheap access to ability modules. Theoretically you could download the program for free, and take the time and effort to teach it, or if convenience is important to you, you could buy the program with a lot of ability modules or just the ability modules you need. That seems like a fair setup.

P.S. By making the base program free, I'll probably be making it open source as well. I'll have to consider if I want to do that. Making it open source will either create security vulnerabilities, or require me to develop stronger security systems that don't depend on secrecy and cannot be exploited by altered programs.
Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on August 26, 2009, 02:05:05 am
I ordered a copy of Disney's The Miracle Worker (2000). One day I realized that Helen Keller, despite lacking the ability to see and hear, has accomplished much more than many people possessed of their senses. I think her story might provide valuable insights into the process of learning, and so I also hope to obtain some of her autobiographies and essays. The movie should be here in a week or two.
Title: Prometheus A.I. News and Development Updates
Post by: Freddy on August 26, 2009, 11:28:56 am
Your approach to selling/distributing your software sounds viable.  There's a lot of companies using this method - give the main item away and sell add-ons.  Good luck with it, I think you are on the right track.

I don't know much about Helen Keller, but I will look out for that film.
Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on August 26, 2009, 07:14:02 pm
I'll probably post my thoughts about the movie and her autobiographies in relation to learning and a.i. in another post. I'll put a spoiler warning in the thread title.
Title: Prometheus A.I. News and Development Updates
Post by: Freddy on August 26, 2009, 09:13:54 pm
Ok that would be great  ;D
Title: Prometheus A.I. News and Development Updates
Post by: one on August 27, 2009, 02:13:00 am
Irh9,
     If you need help de-bugging through conversing and such,, I would be willing to help if you so desire, lemmie know.

Regards,
J.
Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on August 27, 2009, 04:33:58 am
I've finished writing at least a dozen of the two dozen functions I needed to complete for the a.i. brain. I need to go back and write input validation, but that is fairly easy to implement. Most of the functions I have left to write are the harder ones to write. The one to register the a.i. won't be too complex. Someone who scripts for the language I'm working with has all ready created a universally unique identifier generator.

The most complex function to write will be the function to process messages to the a.i. brain. This will not be because receiving messages is particularly difficult, it is because I'll have to write a function to serialize and deserialize data into a string, because the message system can only message integers or strings. This will also solve the problem of obtaining multiple return values from functions.

I'll need to write several functions in the a.i. manager script and the a.i. environment interface modules before I'll have a remotely working version of the program. It's intended to be more than a chatbot, so hopefully anyone who tests it will be able to do much more than converse with it. In fact, seeing as it is intended to be solely equipped with the abilities of a child, it may take quite a bit of time to teach it to converse.

I think the companies shipping me my movie are jerking me around. The store website tells me to contact the shipper and when I wrote to the shipper, they told me to contact the store. I'm going to contact the store tomorrow, and if they can't help me, I'm getting a refund. I purchased from Walmart, so I'd recommend just avoiding them. If you can find it on Newegg, order there, because I had four or five orders and each one arrived promptly and well packaged.

I'm going to go ahead and watch one of the older versions of the movie. They keep one of the older copies on YouTube. Hopefully I'll still be able to learn what I need from it. I also still have the autobiographies to fall back on.

Understanding how Helen Keller learned is really the major crux of my project at this point. The insights I hope to obtain will tell me if I need to add to the environment interface modules in any way. My preliminary analysis of what I remember from Helen Keller's story is that primarily she had the abilities to interact with the environment and she had goals. The movies suggest that she all ready had learned and possessed abilities to obtain what she wanted. However, it was when she learned that symbols represent objects is when she really started communicating. Her story involves several inter-related (but not necessarily inseperable) topics. I'll need to pay attention very carefully to learn what I need to implement.
Title: Prometheus A.I. News and Development Updates
Post by: one on August 27, 2009, 05:57:23 am
Irh9,
I have had enjoyable and patient conversations with new bots and would gladly help break new ground on your bot.
I am a bit odd but I have had success, and enjoy learning from an outside point of view how they pick up words and learn.

I must say that Ricky' from Zabaware messageboards did mention Helen K. and I did not encourage him but did think he was on to something bigger than he knew.
I spent a LOT of time alone and isolated so I understand some pretty twisted things such as sound deprivation and how humans use alternate senses to aid in continuance ,,, Bla Bla,

Gimmie a shout when you are ready,
Regards,
J.
Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on August 29, 2009, 07:14:46 am
The most complex function to write will be the function to process messages to the a.i. brain. This will not be because receiving messages is particularly difficult, it is because I'll have to write a function to serialize and deserialize data into a string, because the message system can only message integers or strings. This will also solve the problem of obtaining multiple return values from functions.

Good news. I figured out a way to simplify the process. All data being transferred would be numbers and ASCII strings. I realized that since I needed a delimiter, I could use a non-printing ASCII character. This will make it very easy to differentiate the different fields in a string and separate them appropriately. I foresee a much earlier completion of the a.i. brain due to this.
Title: Prometheus A.I. News and Development Updates
Post by: Freddy on August 29, 2009, 04:43:22 pm
Nice work  ;D
Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on September 13, 2009, 02:24:39 pm
I don't know. I've never read any of his work and I don't know anything about his latest book. I'm more into stuff by Robert Jordan myself.

Right now I'm reading a book named Moral Machines. Maybe you've seen my post about it.

I finished watching the movie about Helen Keller. I just have to go over my notes one more time to formalize the ideas that I need to analyze. I'll probably be watching L'enfant Sauvage soon. I finally got a copy yesterday.

I probably won't be programming any more of my project at least until I finish watching L'enfant Sauvage. I'm pretty confident I got the mechanics of learning - at least insofar as they can be applied to computers - correct. However, I should have paid more attention to the method of learning. What I discover about learning from these two movies might prove that my project - as it stands - will not succeed. I do not want to take the effort of creating something that is supposed to learn if I cannot teach it.
Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on September 27, 2009, 09:23:56 am
I finished researching my material. Now I need to evaluate which direction I want my a.i. project to go in.
Title: Prometheus A.I. News and Development Updates
Post by: Art on September 27, 2009, 08:20:56 pm
Have you given further thought as to what method you will employ for the bot to learn or will there be Options from which the user can choose?

Will there also be a provision for it to learn or at least draw information / answers from searching the Internet?

Does any of this "learned" information go into a database or table for future reference?

No offense but let's hope this bot is not another typical AIML / Pandora / scripted type of bot! There's no real learning unless the "botmaster" assists and IMO, that's NOT learning!

If I can be of assistance don't hesitate to ask!

Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on September 28, 2009, 04:15:48 am
I disagree with your opinion about human assisted learning. Without human assisted learning (from our parents, teachers, and peers) we'd barely survive and even then we'd just be scratching around in the dirt. The majority of human knowledge is learned by rote. I suppose one could make a semantic distinction between obtaining or generating original knowledge and acquiring the knowledge in another person's or item's database. Regardless, human assisted learning is vital to rapid individual advancement and advancement of a group's knowledge base.

However, from the potential abilities I've noticed of the program, there are certainly some that suggest it will be more advanced than previous chatbots and desktop assistants. I won't go into all of them, because some are more certain than others, and some may be taken out, and some may be added, but one that really excites me is that the program may have the potential to be symbol grounded.

Basically, symbol grounding is how words get their meanings. When we know that "apple" represents an apple, then the symbol "apple" is grounded to the physical object. One thing almost universally agreed necessary for symbol grounding is a sensorimotor system. Basically the ability to interact and obtain data about objects. Our body is a sensorimotor system. We obtain data about the apple such as its color, taste, shape, and texture and then we can assign a word to it. This program could accomplish the same thing given sufficient sensorimotor mechanisms. I'll admit, there is some debate as to whether having sense data on an object is sufficient to give a word a meaning. One hypothesized vital component is consciousness. We'll have to wait and see how it turns out.
Title: Prometheus A.I. News and Development Updates
Post by: Art on October 06, 2009, 03:17:17 am
Symbol grounding...

You might look into the ASL for some additional insight.

My grandchildren were taught a lot of it at a very early age
and became quite adept at communicating with it way
before they could even talk.

And yes, you're certainly entitled to your opinion no matter
how far removed it may be from mine.

I merely expressed the idea that the scripted bots were
not the learning type of bots. The late KnyteTrypper and I
often had lengthy discussions of scripted vs learning and
while each type has it's place, we both agreed that the bots
that could learn unaided or unassisted were by far, more
interesting in their sometimes unexpected conversational
responses.

To each their own.
Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on October 06, 2009, 12:53:56 pm
Just how does something learn something useful unaided and unassisted?
Title: Prometheus A.I. News and Development Updates
Post by: Maviarab on October 06, 2009, 01:30:45 pm
Trial and error?
Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on October 06, 2009, 01:55:02 pm
How does something recognize when it has encountered an error?
Title: Prometheus A.I. News and Development Updates
Post by: Bragi on October 06, 2009, 02:24:38 pm
Quote
Just how does something learn something useful unaided and unassisted?
Perhaps an othother way besides trial and error, you can try to find an algorithm that is able to find structure in the incomming data.
Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on October 06, 2009, 07:47:55 pm
Quote
Just how does something learn something useful unaided and unassisted?
Perhaps an othother way besides trial and error, you can try to find an algorithm that is able to find structure in the incomming data.

That is assisting the program.
Title: Prometheus A.I. News and Development Updates
Post by: Art on October 07, 2009, 12:48:43 am
I think what some of us are trying to get you to see are programs similar to the John Lennon or Jack-the-Ripper or AIML bots that are almost "expert systems" in that they contain a finite amount of data regarding a particular subject. Any additional information or data must therefore be added by a diligent botmaster.

Other bots might very well absorb new data gleaned from conversations and filed away only to be recalled later, perhaps next week or when the bot deems it to be an appropriate "link" from one subject to another, etc.

Some bots can be asked to "read" a passage of text. Though individual words and phrases are not selected by a botmaster as such, the bot can and will again use said information at its disposal often surprising the user.

Though I had long forgotten a conversation I once had with a bot, months later it brought up a small facet of my family that actually made me wonder how or where it had learned that information. Upon reflection, I realized that it must have been part of an earlier conversation but the bot "saw fit" or at least chose to save that info for later use.

The word "learning" in the context of a chatbot often takes several forms and is accomplished by as many methods but we all know it's just "managing" the words, phrases or paragraphs and filing away some key bits of information like subjects, actions, relationships or proper nouns, etc.

Regardless of the internal mechanics of the bot, it is ultimately the output that either impresses or annoys the end user.

There is no right way to construct a bot and while none are perfect they all offer us a small glimpse of how our own minds work.

Title: Prometheus A.I. News and Development Updates
Post by: Bragi on October 07, 2009, 09:02:11 am
Quote
The word "learning" in the context of a chatbot often takes several forms and is accomplished by as many methods but we all know it's just "managing" the words, phrases or paragraphs and filing away some key bits of information like subjects, actions, relationships or proper nouns, etc.

Regardless of the internal mechanics of the bot, it is ultimately the output that either impresses or annoys the end user.
Exactly: it's just a trick that manages to impress us (if we're lucky).
Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on October 07, 2009, 06:25:54 pm
I just hope I'll be able to construct an a.i. that can have an actual understanding, at least more of an understanding than current a.i. programs do.
Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on November 09, 2009, 01:47:15 am
I have taken a small vacation, but otherwise I fully intend to continue my work.

Right now I'm still learning the intricacies of the Python language and modifying my abstract design of my a.i. agent framework as necessary. I'm trying to be as simple and lazy as possible, in the good way. Basically I want to reduce the complexity of the design and reduce the amount of code. However, those goals conflict with other goals such as conceptualization - designing and using the program around a concept. While there might be a simple way to do something, it isn't exactly the way it should be thought of. For instance, I could import ability modules into the agent using a simple import statement, but that doesn't exactly fit with the concept of messaging. I need to find a way to reconcile these differences.

I've really only had one legitimate person interested in the project, and it has been some time since we've had some contact, but I'll do all of this by myself if I have to. Indeed, that's what I foresaw from the start.
Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on November 22, 2009, 11:25:31 am
I've worked some more on my program.

Using Python's object oriented features, I've made progress on the design of the agent itself.

I've written an agent class, and I added a property for its unique identifier, which was supplied from Python's uuid library. I'm glad for that, because I would have had to write an algorithm or implement an algorithm myself.
Code
#Python 3.1

from uuid import uuid4 as _uuid4   #Provides access to a function for creating a universally unique identifier.

class Agent:

    def __init__(self):    #This function is executed each time an agent is created.
        self._uuid = _uuid4()    #Sets the agent's universally unique identifier

    def _get_uuid(self):    #This function returns the agent's uuid.
        return self._uuid

    uuid = property(_get_uuid)    #Defines a general attribute with a get() method.

#Test code. Delete the quotations to run.
"""
agent = Agent()    #Creates an agent.
print(agent.uuid)    #Prints the agent's universally unique identifier.
"""

I'm also excited by the possibility of using Python's import feature to utilize ability modules, instead of the messaging system I was previously considering. I thought about this idea one night, so I did some tests and determined that Python object's - such as agents - can have their own instances of modules. The most obvious benefit of this is that it would save a lot of development time by using an existing system instead of one made from scratch.

Modules provide a place to store function and class definitions, so any agent importing the module would have access to those. That's one of the obvious functions of ability modules. I'll just have to consider how a Python module could communicate with hardware - because eventually this system is intended to work with hardware - and I'll have to consider how object's could share a module.
Title: Prometheus A.I. News and Development Updates
Post by: one on November 22, 2009, 06:09:23 pm
Lrh9,

Ummm I think we have 'cannonized' your stuff, If you get the time to do it,, try and find/create links to your posts of your project including your first proposition and asking Freddie if you could recruit here.
take the links and ask Freddie if he would COPY your info and relevant converse to a single Thread.

"'Chaos' is a state, thus it needs to be started/initiated, manipulated and ended." -J.

It is just hard to follow and IMO staying within the confines of a single thread, when concerning your project, would be a nice thing, from the readers point of view and posterity.

Lookin' good

J.
Title: Prometheus A.I. News and Development Updates
Post by: lrh9 on November 23, 2009, 09:45:03 am
Lrh9,

Ummm I think we have 'cannonized' your stuff, If you get the time to do it,, try and find/create links to your posts of your project including your first proposition and asking Freddie if you could recruit here.
take the links and ask Freddie if he would COPY your info and relevant converse to a single Thread.

"'Chaos' is a state, thus it needs to be started/initiated, manipulated and ended." -J.

It is just hard to follow and IMO staying within the confines of a single thread, when concerning your project, would be a nice thing, from the readers point of view and posterity.

Lookin' good

J.

I suppose it would be better to say, "Updates on program, see thread.", than cluttering a discussion. I'll give it some consideration and then contact Freddy with my proposal and coordinate with him.
Title: Re: Prometheus A.I. News and Development Updates
Post by: Freddy on November 23, 2009, 09:01:07 pm
And as if my magic it all happened...
Title: Re: Prometheus A.I. News and Development Updates
Post by: lrh9 on November 26, 2009, 02:15:09 pm
I've decided to implement the modules as abilities scheme. There are a few minor problems, but I'll figure them out.

Code
from uuid import uuid4 as _uuid4

UUID = 0

class DuplicatedModule:

    def __init__(self, module_object):
        self.__dict__ = dict(module_object.__dict__)


class Agent:

    def __init__(self, name = UUID):
        self._uuid = _uuid4()
        if name is UUID:
            name = self._uuid
        self.name = name


    @property
    def uuid(self):
        return self._uuid


    def add_ability(self, key, duplicated_module):
        self.__dict__[key] = duplicated_module

myagent = Agent()

import random

myagent.add_ability('random', DuplicatedModule(random))

print("myagent now how its own copy of random, and altering its random's attributes and methods does not affect the global random.")
print("In the default random, BPF is {0}.".format(myagent.random.BPF))
print("Setting myagent.random.BPF to 1.")
myagent.random.BPF = 1
print("myagent.random.BPF is now {0}.".format(myagent.random.BPF))
print("global random.BPF is still {0}.".format(random.BPF))

The main problem is that the duplicated module doesn't compare as the same to a module object. I can't think of any reason why someone would need to check that the agent's abilities are modules without knowing it, but it's something I want to learn more about.

P.S. I thought some of you might enjoy this comic about the reverse Turing test.

http://xkcd.com/632/
Title: Re: Prometheus A.I. News and Development Updates
Post by: Freddy on November 26, 2009, 04:14:49 pm
Hehe, funny  ;D
Title: Re: Prometheus A.I. News and Development Updates
Post by: one on December 03, 2009, 07:22:36 am
Larry,
I need to review what you have here, but I do have a few good ideas. I believe their is room for another assistant type A.I.

Lets start a 'Wave' soon (I'll send invite) and discuss a few things after I catch up w/u

J.
Title: Re: Prometheus A.I. News and Development Updates
Post by: lrh9 on January 16, 2010, 04:27:35 pm
I've been doing more research into modules, and I discovered how to manually create a module object.

PEP302 is a Python document about how to create a custom import hook. An import hook is a class that has specific functions called when an import statement is encountered in code.

PEP302 describes a basic method for loading a module.

Code
def load_module(self, fullname):
            ispkg, code = self._get_code(fullname)
            mod = sys.modules.setdefault(fullname, imp.new_module(fullname))
            mod.__file__ = "<%s>" % self.__class__.__name__
            mod.__loader__ = self
            if ispkg:
                mod.__path__ = []
            exec code in mod.__dict__
            return mod

I added a similar method to the agent.

Code
def importcopy(self, file, name):
        file_stream = open(file)
        module_code = file_stream.read()
        self.__dict__[name] = imp.new_module(name)
        exec(module_code, self.__dict__[name].__dict__)

However, this isn't the final code. It is only a shim. I've been in the process of creating a fully functioning importer that will be more robust and function similarly to the current Python importer. I only included this to allow some testing if I decide to implement other agent functions. I'm beginning planning for the agent's low level command interface. This low level interface will serve as a way to alter and control the agent using raw Python code.
Title: Re: Prometheus A.I. News and Development Updates
Post by: lrh9 on January 18, 2010, 11:10:07 pm
The Python standard library has a module named "code" that provides code for emulating the Python interactive interpreter. Now all I need to do is remove the interactive generalization so that other objects can interface and control the agent.

Code
def control(self, local = None):
        if local == None:
            local = locals()
        try:
            code.interact(local = local)
        except SystemExit:
            return
Title: Re: Prometheus A.I. News and Development Updates
Post by: lrh9 on January 19, 2010, 05:57:07 pm
OK. The module does have a base class for an interpreter. I'll make an interpreter an attribute of the agent, and allow developers and users to define the interface to this interpreter. I might add code for a basic command line and GUI interface by default.
Title: Re: Prometheus A.I. News and Development Updates
Post by: Freddy on January 19, 2010, 08:20:38 pm
Good to see you are getting along with this.  I am afraid it all looks like Greek to me as I only ever touched the surface of Python.  But hopefully with these regular reports you will run into someone who you can converse with more on this.
Title: Re: Prometheus A.I. News and Development Updates
Post by: lrh9 on January 19, 2010, 08:40:03 pm
Thanks. I'd be more than happy to answer anyone's questions though to the best of my ability.

I'm also considering adding a thread of execution to the agent. In computer science terms, an "agent" is typically defined as a software system capable of being proactive and/or responding to the environment. An agent for instance can start itself on the basis of certain conditions, respond to certain conditions, or even suspend its own operation. Autonomy (self-control) is a very import part of "agency". You might think of your anti-virus application as an agent, because it scans incoming files and active processes and acts to remove threats - for the most part without user involvement.
Title: Re: Prometheus A.I. News and Development Updates
Post by: lrh9 on March 03, 2010, 05:12:48 am
Created a functional importer in the agent.

Need to polish up code in the meantime.
Title: Re: Prometheus A.I. News and Development Updates
Post by: lrh9 on June 29, 2010, 06:47:14 am
Finished up a importing system finally. Unfortunately I've been working on it so long that I've neglected where I want to go with the actual agent software. I need to give that some more reevaluation.

Been trying to get my thoughts together better.

Working on a diagram to help me think about it.
Title: Re: Prometheus A.I. News and Development Updates
Post by: Bragi on June 29, 2010, 05:54:25 pm
Quote
Finished up a importing system finally.
Getting something hard done, always a nice moment.
Title: Re: Prometheus A.I. News and Development Updates
Post by: lrh9 on June 29, 2010, 06:20:39 pm
Yep. And I'm keeping it archived and saved at multiple locations too. :)

Hate to lose it now. Of course, now that I've solved the problem once through I'm fairly confident it wouldn't be too hard for me to get to the solution again.
Title: Re: Prometheus A.I. News and Development Updates
Post by: Bragi on June 29, 2010, 06:25:20 pm
I now what you mean. I do the same thing: off-site backups. Something I picked up from my previous job.
Quote
Of course, now that I've solved the problem once through I'm fairly confident it wouldn't be too hard for me to get to the solution again.
Ye, but, do you like to do that? :P
Title: Re: Prometheus A.I. News and Development Updates
Post by: lrh9 on June 29, 2010, 06:50:11 pm
No. But it is a nice option to have.

The beginnings of the diagram I've been working on using the diagram designer I mentioned at http://aidreams.co.uk/forum/index.php?topic=3642.msg15246

(http://i564.photobucket.com/albums/ss90/lrh9/Artificial%20Intelligence/AIandplatform.png)
Title: Re: Prometheus A.I. News and Development Updates
Post by: lrh9 on June 29, 2010, 07:03:56 pm
Sorry it kept the whitespace at the bottom of the page. I'll take the time to crop it next time.
Title: Re: Prometheus A.I. News and Development Updates
Post by: TrueAndroids on June 29, 2010, 08:23:54 pm
Hi, nice design. Diagram easy to understand. So is the Prometheus A.I. the A.I. in the diagram? I'm wondering about data storage - will the 'appropriate actions' and 'goals' be stored in a database, along with their rules as part of the A.I.? Anyway just wondering and this was my first thought as I looked at it.
Title: Re: Prometheus A.I. News and Development Updates
Post by: lrh9 on June 29, 2010, 08:38:53 pm
The diagram was intended to be more conceptual than a schematic of an implementation, but I suppose as ideas become clearer and more refined then it may be the implementation. Regardless, it should be representative of what I'm trying to do.

Hopefully one thing that will give my model and implementation strength is that I always try to draw parallels in my mind between robot and computing systems and a person.

For instance, our skeletal system is our platform, and some of our sensors (what we use to obtain information about our environment) are our eyes, ears, nose, tongue, and touch. Our actuators (what controls our body) are our central nervous system and muscles.

Hopefully by drawing these parallels and thinking about intelligence and consciousness in terms of psychology I'll be able to get a clear concept of what needs to be implemented in the a.i., what needs to emerge, and what needs to be learned.

I do think I will need to implement some type of generic goal software object. I think that even simple instincts could qualify as goals to be fulfilled. (Eating, sleeping, reproduction.) We are born with instincts, which I would say in computing analogy is being preprogrammed. (By genetics in our case and by software in the case of robots and a.i.)

Obviously those exact instincts won't be implemented in a robot system, but again parallels can be drawn in the form of obtaining proper power supply, conserving energy, obtaining software updates, performing maintenance, and replicating both the platform and/or the software if so instructed.

My next step with the diagram is to draw a bubble coming out from the a.i. bubble and then work on filling that in.
Title: Re: Prometheus A.I. News and Development Updates
Post by: sunama on February 13, 2011, 12:15:56 am
Hi,

Do you have a website for your project?

sunama
Title: Re: Prometheus A.I. News and Development Updates
Post by: Freddy on February 13, 2011, 01:08:12 pm
Larry hasn't been on the board for a while now, I suggest trying to send him a private message as that will send him a notification via email.
Title: Re: Prometheus A.I. News and Development Updates
Post by: lrh9 on March 09, 2011, 04:21:56 am
I don't have a website.

I'm waiting to achieve tangible results before I find a permanent home.

Even then I wouldn't fully publish until I had reached what I consider to be "completion".

I'm still in the theory and design stage at the moment.

I may be suffering from "analysis paralysis". Letting indecisiveness get in the way of acting.

However, I'm working on a framework for developing and experimenting with a.i.

I think virtual agents in a virtual environment will be a cheap but effective way to test and experiment with ideas.

When you have agents interacting with each other and the environment, they need a way to gain information.

I'm writing a message based event system so that agents can be informed. Events are more efficient than agents polling for information themselves, because events only run when they occur. Polling is constant.

I have the basic message system complete, and I need to decide whether I want agents and the environment to update iteratively (each agent or object acts one after another, and conflicting changes are mediated after every update) or continuously using concurrency. (Where programming changes in agents and objects is much more natural, but has the extra overhead of locking critical sections.)

I've written the concurrent system. Now I need to think on how the iterative system would work.
Title: Re: Prometheus A.I. News and Development Updates
Post by: lrh9 on July 28, 2011, 05:35:33 am
Long time, no update.

I wrote a frame based event and task system.

I was inspired by the Panda3D rendering and simulation engine manual, but I didn't get the engine itself until after I finished my implementation.

It's nearly identical to the Panda3D implementation, so I'm leery of publishing what I coded for fear intellectual property issues.

I've come away with a stronger understanding of events and task handling though.

I'm strongly considering the Panda3D engine for my a.i. frameworks and simulations.

It provides my primary prerequisites for simulations, and it features rendering, sound,  and several libraries (such as physics and collision detection) from day 0. Things I would have had tremendous difficulty adding or integrating to my own system by myself.

Now that I have finally found a technology that I'm confident can handle simulations and virtual environments, it is time for me to get back on track in deciding what to simulate and how to simulate it.
Title: Re: Prometheus A.I. News and Development Updates
Post by: Freddy on July 29, 2011, 12:42:02 pm
Long time indeed but welcome back.

I'm very interested in 3D engines at the moment, I have tried lots.  At the moment I am working with MS XNA.  My focus at the moment is on an creating an avatar, but I am held back by my inexperience in C#

I was just wondering what other engines you tried.  I guess the Python aspect is a big reason ?

What kind of environments will you be creating and what do you hope your AI will learn from them ?

This AI Life project might interest you : Grandroids (http://stevegrand.wordpress.com/2011/03/02/grandroids-faq/)
Title: Re: Prometheus A.I. News and Development Updates
Post by: lrh9 on July 30, 2011, 04:17:31 am
Thank you for the welcome back, Freddy.

The Grandroids project does interest me.

I read about it the last time I was visiting aidreams when user bruce wilcox notified us about it.

I'm glad Dr. Grand exceeded his funding goals.

I would like to see my own efforts produce something for use in human education and entertainment.

I chose Panda3D because it is free to use freely, it seems good, and it has a Python API.

I can't say I have given due diligence to researching other options, but I have browsed the Blender and Python-Ogre sites.

I need more time to think about agency, environments, and my efforts before I can continue our discussion.
Title: Re: Prometheus A.I. News and Development Updates
Post by: Freddy on July 30, 2011, 12:21:49 pm
Yes Steve Grand did amazingly well in raising funds, very impressive indeed.

Ogre has a .NET version called Mogre, which you probably already knew.  I got it working and may well go back to it as they seem quite helpful there. I'm sticking to XNA for the time being as it will help me learn C#.  And that's free too.

Fair enough about needing more time, don't be a stranger  :)
Title: Re: Prometheus A.I. News and Development Updates
Post by: lrh9 on August 02, 2011, 03:47:12 pm
My end goal of my efforts has always been agent software with applications in virtual and physical environments.

(With additional requirements of artificial intelligence such as autonomy and learning capabilities. Otherwise it would be better to write domain specific software.)

To that end, I'll test my agents against environments that model the intended domains as realistically as possible.

(The web and games for virtual applications, and a physical simulation for physical applications.)

If my theories and implementation are correct, successes in tests should carry over to success in applications.

(If not I will have to go back to the drawing board.)

I think I will be starting small though. I can do some small preliminary tests on an idea or agent implementation.

For instance, if I wanted to implement an agent with a short-term/long-term memory model, I could simply populate a virtual environment with any virtual objects.

Code can check that the agent remembers or forgets objects it has encountered as appropriate.

As I flesh out the agent, I'd create more complex environments in the hopes of eliciting desired emergent behaviors.

For instance, an agent that remembered every object in a building or area might quickly run out of memory. However, if a challenge in my environment required the agent to know what was in a room I'd hope that my agent would take appropriate steps to solve the problem without me having to dictate its action. For instance, I'd hope it would return to the room in question or initiate contact with an agent that does know what is in the room. Desirably, this behavior would emerge out of its basic artificial intelligence systems.

That was just an example. It may be too high level, but I hope it conveys my early thoughts and I hope my plan is right.
Title: Re: Prometheus A.I. News and Development Updates
Post by: lrh9 on September 04, 2011, 11:14:25 am
I've decided to implement a Python library for existing a.i. techniques while I am working on my theory of intelligence.

It may happen that my theory will incorporate some of the techniques, and even if it does not I will at least have proof positive that I understand them. I will also release my library. Hopefully we will see more people involved in implementing a.i. theories and applications.

I'm starting off with fuzzy logic.

http://en.wikipedia.org/wiki/Fuzzy_logic (http://en.wikipedia.org/wiki/Fuzzy_logic)

At the moment I have implemented fuzzy sets, but I still need to implement fuzzy linguistic variables, advanced inference, defuzzification, and the Combs method.

It's possible to create a fuzzy set from a membership function, get elements' memberships in the set, get the complement of the set, the intersection of sets, the union of sets, modify the set, and the implication of two sets.

P.S. I have all ready thought of a potential refactoring that may increase flexibility. Software development (especially my software development  :P) is an iterative process of refinement.

Existing Python 3.1 code:

Code
# encoding: utf-8

##The MIT License
##
##Copyright (c) 2011 Larry Haskins
##
##Permission is hereby granted, free of charge, to any person obtaining a copy
##of this software and associated documentation files (the "Software"), to deal
##in the Software without restriction, including without limitation the rights
##to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
##copies of the Software, and to permit persons to whom the Software is
##furnished to do so, subject to the following conditions:
##
##The above copyright notice and this permission notice shall be included in
##all copies or substantial portions of the Software.
##
##THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
##IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
##FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
##AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
##LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
##OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
##THE SOFTWARE.

"""A module for fuzzification, defuzzification, and fuzzy knowledge
categorization, representation, and decision making."""


import math
import weakref

__author__ = "Larry Haskins"
__version__ = "1.0"
__all__ = ['never',
           'very',
           'extremely',
           'more_or_less',
           'slightly',
           'FuzzySet',
           'nothing',
           'everything',
           'always']


#TODO: Refactor sufficiently similar code to functions.


def never(element):
    """Special case membership function.

    Only fuzzy sets with this membership function are empty.
    """
    return 0

#COMMON MODIFIER FUNCTIONS

def very(value):
    return value ** 2

def extremely(value):
    return value ** 3

def more_or_less(value):
    return math.sqrt(value)

def slightly(value):
    return value ** (1/3)

#END COMMON MODIFIER FUNCTIONS


class FuzzySet(object):

    """Represents the mapping of items in the universe to their degree of
    membership in the set."""

    #NOTE: Fuzzy set theory differs from classical (or Boolean) set theory.

    _complement_functions = weakref.WeakValueDictionary()
    _intersection_functions = weakref.WeakValueDictionary()
    _union_functions = weakref.WeakValueDictionary()
    _modifier_functions = weakref.WeakValueDictionary()
    _implication_functions = weakref.WeakValueDictionary()
   
    def __init__(self, membership_function):
        """The membership function calculates an element's degree of membership
        in this set.

        Membership functions must always return a value on the
        interval [0, 1], with 0 meaning the element is not in the set, and 1
        meaning the element is fully in the set. Intermediate values indicate
        partial membership.
        """
        super(FuzzySet, self).__init__()
        self._membership_function = membership_function

    @property
    def membership_function(self):
        return self._membership_function

    def complement(self):
        """Returns the complement set.

        Conceptually, the complement is the logical opposite of the original.
        If an element has a high degree of membership in the original, it will
        have a low degree of membership in the complement. If an element has a
        low degree of membership in the original, it will have a high degree of
        membership in the complement.
       
        Note: The complement of a complement is equal to the original.
        """
        cls = self.__class__
        membership_function = self._membership_function
        try:
            complement_function = cls._complement_functions[membership_function]
        except KeyError:
            def complement_function(element):
                return 1 - membership_function(element)
            cls._complement_functions.update({membership_function: complement_function,
                                              complement_function: membership_function})
        return cls(complement_function)

    def __hash__(self):
        return hash(self._membership_function)

    def __getitem__(self, element):
        return self._membership_function(element)

    def __eq__(self, other):
        """Two sets are equal if and only if the two membership functions are
        the same for all elements in both.

        It is impossible to check all
        elements. Checking a finite collection of elements is incorrect. The
        membership functions may differ for elements not explicitly checked.
       
        ATTENTION: If you know a better way to compare functions please inform
        me.
        """
        return self._membership_function == other._membership_function

    def __bool__(self):
        """A set is empty if and only if the membership value is always 0."""
        return self._membership_function != never

    def intersection(self, *others):
        """Returns the intersection of this set and the others.

        The intersection returns the minimum of all membership functions for
        any given element. Conceptually, the intersection is like the English
        word "and". If an element has a high degree of membership in one set
        "and" the others, it will have a high degree of membership in the
        intersection.
        """
        cls = self.__class__
        participants = set(others)
        participants.add(self)
        membership_functions = frozenset(participant._membership_function for participant in participants)
        try:
            intersection_function = cls._intersection_functions[membership_functions]
        except KeyError:
            def intersection_function(element):
                return min(membership_function(element) for membership_function in membership_functions)
            cls._intersection_functions[membership_functions] = intersection_function
        return cls(intersection_function)

    def union(self, *others):
        """Returns the union of this set and the others.

        The union returns the maximum of all membership functions for any given
        element. Conceptually, the union is like the English word "or". If an
        element has a high degree of membership in one set "or" the others, it
        will have a high degree of membership in the union.
        """
        cls = self.__class__
        participants = set(others)
        participants.add(self)
        membership_functions = frozenset(participant._membership_function for participant in participants)
        try:
            union_function = cls._union_functions[membership_functions]
        except KeyError:
            def union_function(element):
                return max(membership_function(element) for membership_function in membership_functions)
            cls._union_functions[membership_functions] = union_function
        return cls(union_function)

    def modify(self, modifier_function):
        """Returns the modification of this set.

        A modifier changes an element's degree of membership in the modified
        set.
       
        Note: A programmer or knowledge engineer must implement the modifier.
        This merely returns the set that applies the modifier.
        """
        cls = self.__class__
        membership_function = self._membership_function
        key = (membership_function, modifier_function)
        try:
            modified_function = cls._modifier_functions[key]
        except KeyError:
            def modified_function(element):
                return modifier_function(membership_function(element))
            cls._modifier_functions[key] = modified_function
        return cls(modified_function)

    def implies(self, other):
        """Returns the implication between this set and the other.

        Conceptually, an implication is a link. An element's degree of
        membership in one set may be low, but if its membership in the other is
        sufficiently high the implication will recognize the link.
       
        Note: Implication is commutative. If one set implies another, the other
        implies it. In real life implication may not always be commutative (at
        least to the same degree). Take this with a grain of salt.
        """
        cls = self.__class__
        key = frozenset((self._membership_function, other._membership_function))
        try:
            implication_function = cls._implication_functions[key]
        except KeyError:
            def implication_function(element):
                return max((0, self._membership_function(element) + other._membership_function(element) - 1))
            cls._implication_functions[key] = implication_function
        return cls(implication_function)

    def fuzzify(self, *elements):
        """Returns the mapping of elements to their degree of membership in
        this set."""
        return dict((element, self._membership_function(element)) for element in elements)


nothing = FuzzySet(never)
everything = nothing.complement()
always = everything.membership_function #opposite of never


if __name__ == '__main__':
    pass
Title: Re: Prometheus A.I. News and Development Updates
Post by: DaveMorton on September 04, 2011, 03:36:46 pm
Ah, so that's an "L", not an "I". I understand now. :)

Good stuff, lrh9! (I'd say "Larry", but you hadn't given your name before, so...) I'm not familiar with Python (though I do have it installed, for Blender, if nothing else), but I'm sure someone here will find the code useful. Thanks for posting it. :)