ouch, a polymorphic expression 2 ai, add a strong auto coder... use a ragdoll to turn it into a bot, ouch.
If only I could use fileWrite to write into my Expression2 folder, I could in theory, use reset() after writing to an existing E2, and make an AI capable of coding itself! Now that I think of it, the check for fileWrite is probably clientside so....
MWUAHAHHAHAAHA!!!
Edit: I was right, the check is clientside, now I can start work on some plan here, assuming reset() doesn't just reset the chip, but also recompiles the file, then it shouldn't be hard to make a self coding AI.
Last edited by Solece; 12-03-2009 at 09:28 PM.
ouch, a polymorphic expression 2 ai, add a strong auto coder... use a ragdoll to turn it into a bot, ouch.
Questions, Comments and Concerns about any of
my posts can be directed to my website which is at
http://vbitz.wordpress.com on the comments post
First and probably biggest problem is that you need to teach the chip to code E2. That's difficult even for some humans.
I mean, they're usually not very smart humans, but human intelligence is kinda the baseline for AI as it is.[highlight=E2]@name Holopattern Generational Evolution Prototype
@persist [Angles Pop Val]:array Gen State
@persist Start Age Old
#Filtering variables
@persist P Vecs:array
#Reseeding variables
@persist [Res As Bs]:array A B
#Stats
@persist G Kill Born
if(first()){
#Holos at different angles indicate different attributes
AnglesushAngle(ang(45,90,0)) #Visual acuity
AnglesushAngle(ang(135,90,0)) #Efficient diet
AnglesushAngle(ang(225,90,0)) #
AnglesushAngle(ang(316,90,0)) #
AnglesushAngle(-ang(45,90,0)) #
AnglesushAngle(-ang(135,90,0)) #
AnglesushAngle(-ang(225,90,0)) #
AnglesushAngle(-ang(316,90,0)) #
#Starting population
Start=100
#Breeding age
Age=1
#Median age of death
Old=5
M=1
while(M<=Angles:count()){
holoCreate(M)
holoAlpha(M,160)
holoModel(M,"hqicosphere2")
Al=255/Angles:count()
holoColor(M,vec(1,1,1)*(Al*M))
holoParent(M,entity())
M++
}
print("==Function start==") G=1
}
interval(100)
R=10 #Ops management
#Initial population seeding
while(Gen<=Angles:count() & Pop:count()<=Start & !State & R){
X=round(random(0,15))
Y=round(random(0,10))
ValushString(X+"-"+Y)
V=vec(X,Y,0)
V=V:rotate(Angles[Gen,angle])
holoPos(Gen,entity()os()+V)
if(Gen==Angles:count()){
S=Val:concat("/")
PopushString(S+"/"+G)
if(Pop:count()>=Start){
State=1
Kill=0
P=Pop:count()
print("===Beginning Generation 1")
print("=Population: "+P)
}
Val=array()
Gen=1
}
else{Gen++}
P=Pop:count()
R--
}
#Population filtering
M=0
while(M<=min(P,R) & State==1 & Pop:count()>1){
Mem=Pop:count()-P #Population member
Str=Pop[Mem,string]:explode("/")
if(Str:count() & R){
Chance=100
#Modification of Chance variable
#determines the odds of survival
#The higher, the better
#Enter criteria for survival here#
#Good vision
S1=Str[1,string]:explode("-")[1,string]:toNumber()
S2=Str[1,string]:explode("-")[2,string]:toNumber()
Sight=(floor(vec(S1,S2,0):length())/18)*12.5
Chance -= Sight
#Efficient diet
S1=Str[2,string]:explode("-")[1,string]:toNumber()
S2=Str[2,string]:explode("-")[2,string]:toNumber()
Diet=(floor(vec(S1,S2,0):length())/18)*-12.5
Chance -= -Diet
#Old age
Age = G-Str[9,string]:toNumber()
Age = (Age/Old)*50
Chance -= Age
#Use details in Str array for reference#
Rand=random(0,50)
Surv=100-Chance
if(Rand<=Surv){
Pop:remove(Mem)
Kill++
#Failure, the member dies
}
P--
}
R--
M++
}
if(!P & State==1){
State=2
print("=Deaths: "+Kill)
}
#Population reseeding
if(State==2 & !Res:count() & Pop:count()>1){
A=round(random(0,Pop:count()))
B=round(random(0,Pop:count()))
As=Pop[A,string]:explode("/")
Bs=Pop[B,string]:explode("/")
Res=Pop:clone()
Pop=array()
}
while(Gen<=Angles:count() & Res:count() & State==2 & R){
#Parent 1's XY variant
Ax=As[Gen,string]:explode("-")[1,string]:toNumber()
Ay=As[Gen,string]:explode("-")[2,string]:toNumber()
#Parent 2's XY variant
Bx=Bs[Gen,string]:explode("-")[1,string]:toNumber()
By=Bs[Gen,string]:explode("-")[2,string]:toNumber()
#Combination
X=round((Ax+Bx)/2)
Y=round((Ay+By)/2)
#Mutation
Ran=round(random(0,1))
if(!Ran){
X+=(Bx*round(random(-1,1)))/10
}
else{
X+=(Ax*round(random(-1,1)))/10
}
Ran=round(random(0,1))
if(!Ran){
Y+=(By*round(random(-1,1)))/10
}
else{
Y+=(Ay*round(random(-1,1)))/10
}
ValushString(X+"-"+Y)
Vec=vec(X,Y,0):rotate(Angles[Gen,angle])
holoPos(Gen,Vec+entity()os())
if(Gen==Angles:count()){
PopushString(Res[A,string])
PopushString(Res[B,string])
#Birth control
Ran=round(random(0,3))
if(Ran==1){Res:remove(A)}
elseif(Ran==2){Res:remove(B)}
elseif(Ran==3){
Res:remove(A)
Res:remove(B)
}
if(Res:count()==1){
Res:remove(1)
}
#Prevents asexual reproduction
else{
#Generate new breeding pair
A=round(random(0,Res:count()))
B=round(random(0,Res:count()))
}
#New parent variable arrays
As=Res[A,string]:explode("/")
Bs=Res[B,string]:explode("/")
#Breeding age or playful curiosity?
Ag1=As[9,string]:toNumber()
Ag2=Bs[9,string]:toNumber()
Breed=(Ag1>=Age & Ag2>=Age)
Fert=(Ag1<=Old*0.8 & Ag2<=Old*0.8)
if(Breed & Fert){
PopushString(Val:concat("/")+"/"+G)
}
Gen=1
}
else{
Gen++
}
R--
}
#If finished populating, return to filtering
if(Pop:count() & !Res:count() & State==2){
State=1
G++
Kill=0
P=Pop:count()
print("===Beginning Generation "+G)
print("=Population: "+Pop:count())
}
#Last Survivor holopattern
if(Pop:count()==1){
Vecs=array()
while(Vecs:count()<=Angles:count()){
Str=Pop[1,string]:explode("/")
X=Str[1,string]:explode("-")[1,string]:toNumber()
Y=Str[1,string]:explode("-")[1,string]:toNumber()
V=vec(X,Y,0)
V=V:rotate(Angles[Vecs:count()+1,angle])
VecsushVector(V)
holoPos(Vecs:count(),V+entity()os())
}
}[/highlight]I'd call this proof of concept as far as creating genetic development in Wire, albeit it's primacy.
Last edited by Lyinginbedmon; 12-04-2009 at 08:39 PM.
The Olympus Technologies drones, totally not SkyNet in Gmod form.
Cronus: The Ultimate Drone, definitely SkyNet in Gmod form.
The gBrain Project, the drone controls system that thinks it's better than you
Well that is really cool.
Teaching a e2 bot code pattens is easy, it learns from a person whenever it does not know something
Questions, Comments and Concerns about any of
my posts can be directed to my website which is at
http://vbitz.wordpress.com on the comments post
They always die out :P
Poor lone person it always end at XD.
Neat code anyway.
Hey guys, I'm using this chance to revive a very old thread to say that today I randomly wanted to try making a chat bot.
I'm beginning with a knowledge base, that contains concepts for some of the most used words of English language.
I thought it would be cool to make a chatbot that can at least make meaningful deductions from what it knows.
Here is how I imagine the knowledge base:
Each word has a node that lists it. There may be more than one meaning to a word and each node is a lemma for similar words (be, is, was).
A node is defined simply by a number. Each node has a list of properties, contexts and other stuff associated with this concept.
For example:
353: Sky
Is A: location(52)
Property: far(32) Above(532) ground(153)
Property: light(3510) blue(1225)
1952: car
Is A: vehicle
Property: has(5) 4 wheels(519)
Passive: be(2) driven(5021)
context: if driven(5021) can(51) go(312)
context: if goes(312) consumes(3582) oil(12884)
Something like that. Naturally it would take years to make a such a list for all English words, so I'll just add the most frequent ones. My chatbot, if I complete it, will take user's input, assign the most probable nodes for words with many meanings based on context, look at the input like a logical problem, then make deductions based on what it knows. While it thinks it will generate it's own persistent knowledge base, and store it separately from the primal one I make. But only if it deems the information important - after a while it could easily generate loads of useless data (like, if a box it to the right of the barrel, nothing happens.) so some information it would forget after a while.
Anyway, I would like to see if anyone has done anything like this, because as I remember, there have been a few chatbots made by wirerers. I've actually heard one speak on HP's server and it was hilarious![]()
Sounds like a neat idea Nikita, I've tried making an AI that uses a database of words with their own definitions, it's easy to get a list of words, the hard part is what to do with those words.
I've been considering the possiblity of a half pattern recognition half quasi-neural network "brain" for a while, haven't put anything substantial together in code yet though, trying to solve the data storage issues.
The Olympus Technologies drones, totally not SkyNet in Gmod form.
Cronus: The Ultimate Drone, definitely SkyNet in Gmod form.
The gBrain Project, the drone controls system that thinks it's better than you
Nikita, your concept there sounds like a bit like a 'Is a - Has a' setup, "A dog is a mammal", "A dog has a tail", "A player has a physgun", "A physgun is a weapon", etc. etc.
Bookmarks