By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,714 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,714 IT Pros & Developers. It's quick & easy.

Mind.py

P: n/a
Now, suppose that you wanted to write an AI in Python that would
implement your mind-model and allow it to grow, mutate, develop.
Here is one possible scenario.

It would not be necessary to do all the work yourself. If we
began coding a baby Mind.py and published the initial code
out on the Web, other Python programmers might start adding
to it and start specializing in the refinement of hotspots.

http://mind.sourceforge.net/aisteps.html begins with a list
of six modules (Security; Sensorium; Emotion; Think; Volition;
Motorium) that could be roughed out as a looping chain as in
http://mind.sourceforge.net/jsaimind.html -- the JavaScript AI.

You or anyone else who disagreed with the choice or naming of
the top-level mind-modules could simply web-publish a Mind.py
with a different arrangement of mind-modules in Python.
Non-global variables could be used, and each coder could
web-publish a Table of Mind.py Variables for reference.

Although it might seem trivial to web-publish only the
initial chain-loop of the cycling mind-modules, one has
to start coding AI somewhere, and there might be novice
Python programmers who would learn Python by coding AI.

[Uh oh; I just got the urge to post this plan on Usenet!]

At a certain critical mass, the Python AI code might escape
the purview of any single code-maintainer and speciate so
widely, so wildly, that Python became the language of choice
for all teaching of AI and all early AI implementations.

I mean, what are the relative Web-saturations of Python and Perl?
Recently on SlashDot or elsewhere I was reading that those who
want a job learn Java, while those who want to code, use Python.
The idea was that Python attracts those who write the best code.

Anyway, once Mind.py code starts appearing on the Web, it may
mutate. If not, "Survival of the fittest" sounds its death-knell.
But results are not instant. Months or years may first go by.

Since I do not know Python, I would keep working on the JavaScript
AI, which I would eventually retro-port into the Mind.Forth AI.

Now in news:comp.lang.python I will post much of the above text.

Sincerely,

Arthur T. Murray
--
http://mind.sourceforge.net/python.html -- Python AI Weblog
Jul 18 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a

On Tue, 17 Aug 2004, Arthur T. Murray wrote:
Now, suppose that you wanted to write an AI in Python that would
implement your mind-model and allow it to grow, mutate, develop.
Here is one possible scenario.


.... cross it with Tim Rue's autocoding and human race is obsolete.
Sincerely yours, Roman A.Suzi
--
- Petrozavodsk - Karelia - Russia - mailto:rn*@onego.ru -
Jul 18 '05 #2

P: n/a

This is non-threaded Mind in Python. I was having fun with this module
as it already was out of control at this early stage of development:

os.execv(sys.argv[0], sys.argv) it appears must have all args as a

second arg, and I supposed that I must exclude sys.argv[0] from it.

All other modules are like this:

-><----------- Security.py

def Security(m):
pass

-><-----------

But they are needed to have something non-trivial.

Rejuvenations are made as complete restarting the process. This is
in case Mind changed some modules by itself ;-) Or even it's main module
aLife.py ;-)

Have fun.
-><------------------------------------------------------------------

#!/usr/bin/python
# -*- mode: python -*-
# $Id:$

"""
aLife() (artificial life) is the Robot AI Mind main loop.
"""

import sys, time, os
from Security import Security
from Sensorium import Sensorium
from Emotion import Emotion
from Think import Think
from Volition import Volition
from Motorium import Motorium
from Voice import Voice

class Mind: # Tabula rasa
pass

rsvp = 1000

def aLife(): # ATM 27oct2002 or your ID & date.
try:
m = Mind() # persistence to be added in future
Security(m) # For human control and operation of the AI.
Sensorium(m) # Audition other human-robot input senses.
Emotion(m) # Quasi-physiological influence upon thought.
Think(m) # Syntax and vocabulary of natural languages.
Volition(m) # Contemplative selection of motor options.
Motorium(m) # Robotic activation of motor initiatives.
except:
sys.exit(0)
rjc = int((sys.argv[1:2] or ['0'])[0])
# If the AI has not met with misadventure,
fyi = "aLife: calling itself t = %s rejuvenations = %i" % (time.strftime("%Y.%m.%d %H:%H:%S"), rjc)
print fyi # Display the Voice:brain "For Your Information".
Voice(m)
time.sleep(rsvp/1000) # End of quasi-loop time-delay of rsvp-value milliseconds.
sys.argv[1] = str(rjc + 1)
os.execv(sys.argv[0], sys.argv) # Call aLife again.
# End of one pass through the aLife Mind that repeats itself.

if __name__ == "__main__":
aLife()

# End of aLife.py
Jul 18 '05 #3

P: n/a

Now it has persistant Memory. Hope it's not a crime ;-)

-><------------------------------------------------------------------

#!/usr/bin/python
# -*- mode: python -*-
# $Id: aLife.py,v 1.1 2004/08/17 15:58:04 rnd Exp $

"""
aLife() (artificial life) is the Robot AI Mind main loop.
"""

import sys, time, os, shelve
from Security import Security
from Sensorium import Sensorium
from Emotion import Emotion
from Think import Think
from Volition import Volition
from Motorium import Motorium
from Voice import Voice

class Mind:
pass

def TabulaRasa():
ms = shelve.open("mind", "c")
ms['mind'] = Mind()
ms.close()

def RestoreMemory():
return shelve.open("mind", "c")['mind']

def SaveMemory(m):
stored = shelve.open("mind", "c")
stored['mind'] = m
stored.close()

rsvp = 1000

def aLife(): # ATM 27oct2002 or your ID & date.
try:
m = RestoreMemory()
Security(m) # For human control and operation of the AI.
Sensorium(m) # Audition other human-robot input senses.
Emotion(m) # Quasi-physiological influence upon thought.
Think(m) # Syntax and vocabulary of natural languages.
Volition(m) # Contemplative selection of motor options.
Motorium(m) # Robotic activation of motor initiatives.
except:
raise
sys.exit(0)
rjc = int((sys.argv[1:2] or ['0'])[0])
# If the AI has not met with misadventure,
fyi = "aLife: calling itself t = %s rejuvenations = %i" % (time.strftime("%Y.%m.%d %H:%H:%S"), rjc)
print fyi # Display the Voice:brain "For Your Information".
Voice(m)
time.sleep(rsvp/1000) # End of quasi-loop time-delay of rsvp-value milliseconds.
sys.argv[1] = str(rjc + 1)
SaveMemory(m)
os.execv(sys.argv[0], sys.argv) # Call aLife again.
# End of one pass through the aLife Mind that repeats itself.

if __name__ == "__main__":
if sys.argv[1] == '0':
print "aLife: mind is born"
TabulaRasa()
aLife()

# End of aLife.py
Jul 18 '05 #4

P: n/a
Roman Suzi wrote:
rsvp = 1000
.... time.sleep(rsvp/1000) # End of quasi-loop time-delay of rsvp-value milliseconds.


Latent bug... someone will decide during maintenance to
change that "rsvp" delay to, perhaps, a smaller value,
resulting in no delay at all...

-Peter
Jul 18 '05 #5

P: n/a
On Tue, 17 Aug 2004, Peter Hansen wrote:
Roman Suzi wrote:
rsvp = 1000
...
time.sleep(rsvp/1000) # End of quasi-loop time-delay of rsvp-value milliseconds.


Latent bug... someone will decide during maintenance to
change that "rsvp" delay to, perhaps, a smaller value,
resulting in no delay at all...


Thank you! Corrected.

New version (refactured) is available:

http://python.onego.ru/mind/__init__.py
http://python.onego.ru/mind/aLife.py
http://python.onego.ru/mind/Security.py
....

(no index yet :-(
-Peter


Sincerely yours, Roman Suzi
--
rn*@onego.ru =\= My AI powered by GNU/Linux RedHat 7.3
Jul 18 '05 #6

P: n/a
"Arthur T. Murray" wrote:
Now, suppose that you wanted to write an AI in Python that would
implement your mind-model and allow it to grow, mutate, develop.
Here is one possible scenario.


http://www.nothingisreal.com/mentifex

--
__ Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
/ \ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
\__/ Can I be your friend / 'Till the end
-- India Arie
Jul 18 '05 #7

P: n/a
Roman Suzi <rn*@onego.ru> wrote on Tue, 17 Aug 2004:
[...]
New version (refactured) is available:

http://python.onego.ru/mind/__init__.py
http://python.onego.ru/mind/aLife.py
http://python.onego.ru/mind/Security.py
[...]


http://yaroslav.hopto.org/pubwiki/index.php/ai-python OT APTYPA!
Jul 18 '05 #8

P: n/a
Erik Max Francis wrote:
"Arthur T. Murray" wrote:

Now, suppose that you wanted to write an AI in Python that would
implement your mind-model and allow it to grow, mutate, develop.
Here is one possible scenario.

http://www.nothingisreal.com/mentifex


its a good thing we all use our minds alike, huh?

Oh wait, so why doesn't Arthur slander or libel himself?

In other words: regardless of whatever I may think of Arthur, he may
actually be applying effort to understand his own unique use of the mind
and then to code a mirror of it.

But this doesn't mean his effort is invalid (even considering the
difficultly cause by being inherently subjective), but only that it is
different than the way you use your mind. Do you fit the norm?

There are plenty of examples in human history where such non-standard
direction and use of the mind brought the whole race improvment in
living standards and enjoyment of life.

L. Da Vinci..... how did he use his mind to do all that he did?

Passon is another quality.

Perhaps the question to ask is: Does the code run?

I think that is about all that is required as qualifying to post in a
usenet comp.lang newsgroup.

As to negative responses to his posting to usenet.... it only shows that
there are more who prefer to act like some animal, a dog perhaps, trying
to bury their favorite bone.

The point is:

its only a matter of time before people on teh internet become
experienced enough with what to expect that such psuedo FAQs and the
likes are realized for what they are. Attempts to control the thought
process of others whom they probably don't know.

Maybe like how the roman numeral accountants promoted "how can nothing
have value? what such a foolish contridiction" in reference to the zero
place holder. And done so in order to protect their position/status in
society and the rewards of it, if not just their own self programming of
their minds.

Imagine, if you are capable of it, that the human mind is programmable.
What program do you have running?

I can't say I understand what Arthur is on about and I don't believe its
possible to create anything more than the illusion of intelligence in
machine, but he has never done anything to put me on a negative side
against him.

And if I don't want to read his posting, well then nobody is forcing me
to. I know how to exercise "choice"! All those who feel that they must
suppress others via the generation of attacks upon them...... well they
appear less capable of using their minds. What sort of AI reflection of
their own minds would they create?

Or is there no "I"ntelligence in their obvious "A"rtificialness.

This is a python language newsgroup, but clearly there are those who
want it to be more constrained than that. There are those who want it to
become either what they want it to be or a negative septic tank, of
which either way its a "my way of no way" line of crap.
Jul 18 '05 #9

P: n/a
threeseas wrote:
Erik Max Francis wrote:
"Arthur T. Murray" wrote:
Now, suppose that you wanted to write an AI in Python that would
implement your mind-model and allow it to grow, mutate, develop.
Here is one possible scenario.


http://www.nothingisreal.com/mentifex


its a good thing we all use our minds alike, huh?

Oh wait, so why doesn't Arthur slander or libel himself?


It's like an epic battle between Racter and Eliza!

--
__ Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
/ \ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
\__/ Who shall stand guard to the guards themselves?
-- Juvenal
Jul 18 '05 #10

P: n/a
Erik Max Francis wrote:
threeseas wrote:

Erik Max Francis wrote:

"Arthur T. Murray" wrote:
Now, suppose that you wanted to write an AI in Python that would
implement your mind-model and allow it to grow, mutate, develop.
Here is one possible scenario.

http://www.nothingisreal.com/mentifex


its a good thing we all use our minds alike, huh?

Oh wait, so why doesn't Arthur slander or libel himself?

It's like an epic battle between Racter and Eliza!

I was *wondering* why this sounded so familiar!
Jul 18 '05 #11

P: n/a
Nick Chackowsky wrote:
Erik Max Francis wrote:
threeseas wrote:

Erik Max Francis wrote:
"Arthur T. Murray" wrote:
> Now, suppose that you wanted to write an AI in Python that would
> implement your mind-model and allow it to grow, mutate, develop.
> Here is one possible scenario.
http://www.nothingisreal.com/mentifex
its a good thing we all use our minds alike, huh?

Oh wait, so why doesn't Arthur slander or libel himself?


It's like an epic battle between Racter and Eliza!

I was *wondering* why this sounded so familiar!


This you? http://www.ratemyteachers.ca/ShowRatings.jsp?tid=47471

and lets not forget what Erik spend his time on..

http://www.crank.net/

.... shrug ... maybe that should be epic battle between Erik and Nick...

this is a python programming language newsgroup.
Jul 18 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.