The AI would not be limited to turtles, as AI could be in a stationary computer. I will add a vote to this post as submissions are added, and the community will vote on their favorites. I will run this for as long as I receive submissions, so get to it, people!
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
[Challenge] Make an AI
Started by Cranium, 11 September 2012 - 09:20 PMPosted 11 September 2012 - 11:20 PM
I know it sounds daunting, but making an AI should be the goal of any programmer/scripter worth their salt. My challenge to you, would be to create an AI. It can do anything you want, as long as it learns. I have seen some AIs before in the forums, but I'm looking for something that will destroy the uncanny valley, and make me put tape on my webcam for fear that my computer is watching me.
The AI would not be limited to turtles, as AI could be in a stationary computer. I will add a vote to this post as submissions are added, and the community will vote on their favorites. I will run this for as long as I receive submissions, so get to it, people!
The AI would not be limited to turtles, as AI could be in a stationary computer. I will add a vote to this post as submissions are added, and the community will vote on their favorites. I will run this for as long as I receive submissions, so get to it, people!
Posted 12 September 2012 - 02:23 AM
I must admit I don't really know how to feel when I hear people talking about AI.
It's such an enormous area, with such an incredibly broad definition that can range from an abstract replica of the human brain (connectivism, the recommendation architecture among others) down to simply creating something that seems intelligent and passes the Turing test (Eliza and her ilk). Even the simple procedures that determine how a computer plays tic-tac-toe can be considered "AI" if by definition alone. The research area is gargantuan- I know of no fewer then 8 existing representations of "hard" AI, that can range from abstract mapping of weights between neurons, the layering and interaction between architectural structures of the brain, symbolic representations of information packages transferred through synapses, the list goes on. I doubt there is a count for the number of soft AI that has been produced over the years- the number of approaches must number in the hundreds.
It sounds as though the AI you want to produce is one that seems to know about the user and can perform tasks that manipulate their world based on observed behaviour- this puts me in mind of HAL from 2001, or something like that. I guess my big question, because I wouldn't mind doing this is what exactly should the AI be doing? An AI on it's own is actually impressively unintelligent, they need an interaction space. A neural net is nothing more than a massive series of weighted AND gates (not unlike the human brain :)/>/> ), and they're best suited for very dynamic tasks, like handwriting, gesture or voice recognition, optimal performance in board games like Chess and other "fuzzy" computations. Minecraft is possibly one of the most discrete virtual worlds out there, so there's not a lot of room for fuzzy information.
If you're looking at trying to find an AI you can play with and want some inspirations, something that feels era-appropriate in Computer Craft, I'd check out the 1963 compilation "Computers and Thought"- that had some landmark research by some of the biggest names in AI programming, like Robert Lindsay, Alan Turing and Marvin Minsky, and it included some really original AI concepts, like the aforementioned ELIZA and an absolutely remarkable program called "Blockworld".
It's such an enormous area, with such an incredibly broad definition that can range from an abstract replica of the human brain (connectivism, the recommendation architecture among others) down to simply creating something that seems intelligent and passes the Turing test (Eliza and her ilk). Even the simple procedures that determine how a computer plays tic-tac-toe can be considered "AI" if by definition alone. The research area is gargantuan- I know of no fewer then 8 existing representations of "hard" AI, that can range from abstract mapping of weights between neurons, the layering and interaction between architectural structures of the brain, symbolic representations of information packages transferred through synapses, the list goes on. I doubt there is a count for the number of soft AI that has been produced over the years- the number of approaches must number in the hundreds.
It sounds as though the AI you want to produce is one that seems to know about the user and can perform tasks that manipulate their world based on observed behaviour- this puts me in mind of HAL from 2001, or something like that. I guess my big question, because I wouldn't mind doing this is what exactly should the AI be doing? An AI on it's own is actually impressively unintelligent, they need an interaction space. A neural net is nothing more than a massive series of weighted AND gates (not unlike the human brain :)/>/> ), and they're best suited for very dynamic tasks, like handwriting, gesture or voice recognition, optimal performance in board games like Chess and other "fuzzy" computations. Minecraft is possibly one of the most discrete virtual worlds out there, so there's not a lot of room for fuzzy information.
If you're looking at trying to find an AI you can play with and want some inspirations, something that feels era-appropriate in Computer Craft, I'd check out the 1963 compilation "Computers and Thought"- that had some landmark research by some of the biggest names in AI programming, like Robert Lindsay, Alan Turing and Marvin Minsky, and it included some really original AI concepts, like the aforementioned ELIZA and an absolutely remarkable program called "Blockworld".
Posted 12 September 2012 - 02:46 AM
If you could make a HAL replica with just CC Lua, I think you might be hailed an absolute genius. I'm looking more towards something as simple as Cleverbot, which just learns based on what is input from thousands of users, all the way to swarm logic(and beyond). I am looking for anything and everything. If you think it's worthy to put up here, do so. I'm just thinking it would be a fun challenge for some of you advanced coders, and a goal for the beginners to show up here.
Posted 12 September 2012 - 09:12 AM
I think AI would be incredibly difficult to make, I was trying to do so for my swarm but in the end you find that it does not learn, you have just programmed it for every eventuality (which can be done as minecraft is a finite reality), I want to make an AI that uses CCsensors to track players and their actions in a focal area (like a base or even a trading area) and eventually make a turtle system to try assist them in doing whatever the AI predicts they will be doing (the prediction would take into account how many times the player was in a certain area, what they did in that area and the inventory, health and armour trends of the player for certain actions etc)
the only problem is that I am not yet on 1.4 as I use tekkit and to be completely honest have given up on fiddling around with it long before I knew CC existed as tekkit invariably crashes after modification… I guess I'm going to be waiting :)/>/>
the only problem is that I am not yet on 1.4 as I use tekkit and to be completely honest have given up on fiddling around with it long before I knew CC existed as tekkit invariably crashes after modification… I guess I'm going to be waiting :)/>/>
Posted 12 September 2012 - 10:20 AM
My troll AI:
Hehe…
EDIT: Changed some of the code.
Spoiler
local t = 0
local c = 0
term.clear()
term.setCursorPos(1,1)
function complain()
if c > 4 then
c = 0
end
if c == 0 then
print("AI> What aren't you talking to me?")
end
if c == 1 then
print("AI> Stop it!")
end
if c == 2 then
print("AI> You're being a jerk!")
end
if c == 3 then
print("AI> Alright fine. I won't talk to you either!")
end
if c == 4 then
print("AI> That's it! Bye!")
error("ragequit")
end
end
function thanks()
if t > 4 then
t = 0
end
if t == 0 then
print("AI> Okay. Thanks.")
end
if t == 1 then
print("AI> Oh cool.")
end
if t == 2 then
print("AI> Thanks!")
end
if t == 3 then
print("AI> Alright.")
end
if t == 4 then
print("AI> Never mind...")
end
c = 0
end
print("AI> Hello!")
while true do
write("ME> ")
message = read()
if message == "" then
complain()
c = c + 1
else
print("AI> What does '"..message.."' mean?")
write("ME> ")
message = read()
if message == "" then
complain()
c = c + 1
else
thanks()
t = t + 1
c = 0
end
end
end
Hehe…
EDIT: Changed some of the code.
Posted 12 September 2012 - 04:44 PM
Well this is a neat little bit of script, but it's not an Artificial Intelligence. As Kaos said, you are just planning out every eventuality, not teaching it how to deal with new, unexpected occurances.My troll AI:Spoiler
local t = 0 local c = 0 term.clear() term.setCursorPos(1,1) function complain() if c > 4 then c = 0 end if c == 0 then print("AI> What aren't you talking to me?") end if c == 1 then print("AI> Stop it!") end if c == 2 then print("AI> You're being a jerk!") end if c == 3 then print("AI> Alright fine. I won't talk to you either!") end if c == 4 then print("AI> That's it! Bye!") error("ragequit") end end function thanks() if t > 4 then t = 0 end if t == 0 then print("AI> Okay. Thanks.") end if t == 1 then print("AI> Oh cool.") end if t == 2 then print("AI> Thanks!") end if t == 3 then print("AI> Alright.") end if t == 4 then print("AI> Never mind...") end c = 0 end print("AI> Hello!") while true do write("ME> ") message = read() if message == "" then complain() c = c + 1 else print("AI> What does '"..message.."' mean?") write("ME> ") message = read() if message == "" then complain() c = c + 1 else thanks() t = t + 1 c = 0 end end end
Hehe…
EDIT: Changed some of the code.
As I have said, it may be fairly difficult for any true AI to surface, but I am sure that someone on this forum wants to do this. Even if it's as simple as pathfinding. That is AI, insomuch that it learns as it goes.
Posted 12 September 2012 - 04:55 PM
i've got an idea for one but not sure if it is possible.
Posted 12 September 2012 - 05:05 PM
Anything is possible if you can think of it. With enough planning, you could make anything with code/script.i've got an idea for one but not sure if it is possible.
Posted 12 September 2012 - 05:07 PM
nice way of putting itAnything is possible if you can think of it. With enough planning, you could make anything with code/script.
EDIT:do cc sensors work for cc1.41
Posted 12 September 2012 - 05:33 PM
Nope, leaving the thread now.but making an AI should be the goal of any programmer/scripter worth their salt.
Posted 12 September 2012 - 06:19 PM
May I ask why?Nope, leaving the thread now.but making an AI should be the goal of any programmer/scripter worth their salt.
Posted 12 September 2012 - 06:19 PM
Nope, leaving the thread now.but making an AI should be the goal of any programmer/scripter worth their salt.
you troll you saw the title [Challenge] Make An AI
Posted 13 September 2012 - 06:28 PM
Implying that one is not "worth their salt" because they don't aspire to make an AI is dumb.May I ask why?Nope, leaving the thread now.but making an AI should be the goal of any programmer/scripter worth their salt.
Posted 13 September 2012 - 07:51 PM
You sir, took that the wrong way entirely. I merely said that anyone who has SOME skill with coding/scripting should aspire to make an AI. Nothing more or less.
Posted 13 September 2012 - 08:21 PM
if we take a human as an example. There are many inputs and most are analog.
we can hear,see, smell, taste and feel
the information is then processed through the brain and used to control Muscle moment chemical release and electrical signals.
The brain over thousands of years has evolved sections to process each type on input then to select the appropriate response. if we tried to calculate the bandwidth of information that is sent /received by the human nervous system I think we would find that It is extremely hight.
compared to minecraft
turtle can detect Redstone and blocks around it rednet communications user input's events that is about it.
the turtle runs a programing language (created by man Inherently flawed as everything created by man is) and designed for multiple prosperous not specifically for input based decision making.
the turtle can output Redstone and rednet as well as move blocks and its self.
if we computer the bandwidth of information a turtle receives it is extremal low (dependent on rednet activity)
Creating a program that based on a small number of input methods reacts in a meaningful way would be a hard task without just programing all possibilities. As some of you are aware I made a psudo AI program that learn (sorta) language skills. Doing that alone I can see how huge making a real AI would be.
Conclusion
what you would be making is a program that can store information compare new information to old information and chose what actions from a list of actions it has learned it should accomplish.The user telling it if it is doing the right thing would also need to be implemented some how and a way for it to try something store information learned from trying and make a new desertion based on that.
I think making a turtle learn how to move in a set pattern could be possible maybe teaching new patterns also. Human speech probably would not be possible for a program alone to implement It takes years to learn to talk thinking that a computer can pick it up quickly would be rather naive.
we can hear,see, smell, taste and feel
the information is then processed through the brain and used to control Muscle moment chemical release and electrical signals.
The brain over thousands of years has evolved sections to process each type on input then to select the appropriate response. if we tried to calculate the bandwidth of information that is sent /received by the human nervous system I think we would find that It is extremely hight.
compared to minecraft
turtle can detect Redstone and blocks around it rednet communications user input's events that is about it.
the turtle runs a programing language (created by man Inherently flawed as everything created by man is) and designed for multiple prosperous not specifically for input based decision making.
the turtle can output Redstone and rednet as well as move blocks and its self.
if we computer the bandwidth of information a turtle receives it is extremal low (dependent on rednet activity)
Creating a program that based on a small number of input methods reacts in a meaningful way would be a hard task without just programing all possibilities. As some of you are aware I made a psudo AI program that learn (sorta) language skills. Doing that alone I can see how huge making a real AI would be.
Conclusion
what you would be making is a program that can store information compare new information to old information and chose what actions from a list of actions it has learned it should accomplish.The user telling it if it is doing the right thing would also need to be implemented some how and a way for it to try something store information learned from trying and make a new desertion based on that.
I think making a turtle learn how to move in a set pattern could be possible maybe teaching new patterns also. Human speech probably would not be possible for a program alone to implement It takes years to learn to talk thinking that a computer can pick it up quickly would be rather naive.
Posted 13 September 2012 - 08:35 PM
See, I think you're right. It would be very hard to make what most people consider to be an AI. But consider this: we see AIs everywhere in video games. Mostly, we see it in pathfinding. When we see those little testificates detect that it is night, and run inside, that is a pre-programmed response. But put something in their way, they will either jump over it, or move around it. Normally, this can't be done with a basic turtle programming, cause it will "bump" into the wall repeatedly until you stop it and tell it to turn around.
Pathfinding can be explained easily by putting yourself in a dark room, with lots of obstacles. You can't see them, but once you feel that they are there, you know where(relatively) the obstacle is, and will remember(hopefully) to avoid it in the future. If a new obstacle is added or removed, you update that mental map you created.
If pathfinding can be added to a group of turtles, navigating off of GPS, then we have the basis of swarm logic. They all know where in relation to each other they are, because they can communicate where each other is, and compare it to their neighbors. If given a set of tasks to complete, they can use that relative positioning information to carry out the instructions as a group.
Most swarm logic, however, is doomed to fail. Try getting even 5 humans to move in sync with each other with absolutely no practice.
I'm sure if enough work is put into it, we might find a passable AI for everyone to enjoy.
Pathfinding can be explained easily by putting yourself in a dark room, with lots of obstacles. You can't see them, but once you feel that they are there, you know where(relatively) the obstacle is, and will remember(hopefully) to avoid it in the future. If a new obstacle is added or removed, you update that mental map you created.
If pathfinding can be added to a group of turtles, navigating off of GPS, then we have the basis of swarm logic. They all know where in relation to each other they are, because they can communicate where each other is, and compare it to their neighbors. If given a set of tasks to complete, they can use that relative positioning information to carry out the instructions as a group.
Most swarm logic, however, is doomed to fail. Try getting even 5 humans to move in sync with each other with absolutely no practice.
I'm sure if enough work is put into it, we might find a passable AI for everyone to enjoy.
Posted 13 September 2012 - 08:57 PM
the basis of a real AI would be its ability to learn a new task. The path finding of mobs never improves it is always the same predictable response to set input. An AI would learn how to move around its environment better with time as it would learn from past mistakes that caused it pain (lose of HP) and move in a better way to avoid pain again.
pseudo move script for mobs.
pseudo move script for mobs.
function moveto(here)
draw line to house
repeat
if line intersects a block move line left or right depended on witch causes less deviation.
until path is clear
repeat
face direction of first part of path
move path length
if object jump
end
until path followed to here
end
if day then
loc = pick random location
moveto(loc)
elseif night then
loc = find nearest door
moveto(loc)
open door
moveto(inhouse)
end
it follows set preprogrammed system.Posted 13 September 2012 - 09:15 PM
Well…now that you explain it with logic, I see your point. I never would have guessed that logic would be so logical… :)/>/>
What about a turtle, that maps out the area, then decides the fastest possible route to a destination through that area?
What about a turtle, that maps out the area, then decides the fastest possible route to a destination through that area?
Posted 14 September 2012 - 02:28 AM
But why? Why SHOULD I aspire to make an AI?You sir, took that the wrong way entirely. I merely said that anyone who has SOME skill with coding/scripting should aspire to make an AI. Nothing more or less.
Posted 14 September 2012 - 02:33 AM
You can feel free to ignore this then. If you don't want, you don't have to. I however, will be trying my hardest, as well as several others I know.
Posted 14 September 2012 - 03:45 AM
See, I think you're right. It would be very hard to make what most people consider to be an AI. But consider this: we see AIs everywhere in video games. Mostly, we see it in pathfinding. When we see those little testificates detect that it is night, and run inside, that is a pre-programmed response. But put something in their way, they will either jump over it, or move around it. Normally, this can't be done with a basic turtle programming, cause it will "bump" into the wall repeatedly until you stop it and tell it to turn around.
I'm going to throw in my two cents here (and ruin it for everyone :)/>/>) and say that pathfinding is not artificial intelligence. Finding a method from travelling from one point to another isn't AI, it's just following A*. The AI in that sort of behavior is deciding where to move to- the basis of this however is still usually not AI either, it's just a series of more complicated algorithms with weighted heuristics and some random behaviors added for variation. How a traditional, connectivist AI might tackle this is choose points relatively randomly, creating a connected graph of all points it can move to. The movement points which lead to the highest success rate (doing more damage to the player or killing the player) would increase the weightings and consequently the chance of moving to that given point, until eventually a much smaller set of "optimal" points have been achieved. That's approaching artificial learning.
So that might look like:
local points = { ... } --All available points, populated at startup
function moveToPoint(index)
local path = points[index]
--pathfinding logic here
return moveSuccess --If our move was successful (dead player etc.)
end
function normalizeHeuristics()
local sumH = 0.0
for i=1,#points do
sumH = sumH + points[i].H
end
for i=1,#points do
points[i].H = points[i].H * (1.0/sumH)
end
end
function choosePoint()
normalizeHeuristics()
--This could be more sophistocated, if need be
local chosenH = math.random()
local sH = 0
for i=1,#points do
sH = sH + points[i].H
if chosenH <= sH then
moveToPoint(i)
break
end
end
end
That's a very shoddy implementation- in reality you'd want a large connected graph rather than just a set of points, so the turtle can choose optimal paths with weightings at each intersection, a little like how BigSHinyToys did above.
Another possible avenue is teaching turtles information about the minecraft world and allowing them to make inferrences as well as decisions about it, that can also be considered learning though this requires guided rather than implicit teaching. An example is an assignment given to third year AI students at Flinders on teaching computers about family relationships (computer responses in BOLD):
Jack is a boy
Understood
Jack is Sam's parent
Understood
Who is Sam's Father?
Jack is Sam's Father.
An ancestor is parent of an ancestor
Understood.
Frederick is Jack's parent.
Understood.
Who are Sam's ancestors?
Jack,Frederick are Sam's Ancestors.
And you can go on to teach him about uncles and godparents and all sorts of other things. I sort of imagine this being used to teach turtles how to craft things- they randomly take ingredients from a chest, then arrange them in patterns to see what causes what. Successful combinations are stored and tested with later heuristics- ingredients that have a high rate of success (wood, sticks, cobble etc) would be weighted as more "interesting" to craft with, while reagents which have fewer possible combinations (redstone, smooth stone) would be "less interesting" and the computer would use them less often.
You could train it with a similar system as shown above:
Craft Sticks 4 with [wood, , , wood, , , , , , ]
Understood.
Craft IronPickaxe with [cobble,cobble,cobble, , stick, , , stick, ]
Understood.
How do you craft 2 IronPickaxe?
Craft 4 Stick with 2 wood, then craft 2 IronPickaxe with 6 cobble and 4 sticks.
I might give that one a try. Of course will all experimentation learning is very slow so it might take awhile before he can do anything interesting but I'll post what I come up with.
Posted 14 September 2012 - 06:03 AM
Creating the learning algorithm and then teaching it is certainly more work than simply creating a file containing all of the recipes, though. Especially in the context of such a limited environment, creating something even AI-like has a terrible cost:reward ratio.
Posted 14 September 2012 - 07:06 AM
I think the real problem at the core of AI is making a program / machine that can learn how to learn. If that was accomplished it would then be capable of learning all other tasks and skills. But for as long as how it learns is constrained it will never be versatile and will only learn in one set way like my pseudo AI talking program.
Posted 14 September 2012 - 07:41 AM
Creating the learning algorithm and then teaching it is certainly more work than simply creating a file containing all of the recipes, though. Especially in the context of such a limited environment, creating something even AI-like has a terrible cost:reward ratio.
That is true but the AI has long term benefits, if we created the recipes list it would work but if we went through the trouble of creating the AI then it allows us to modify the list with ease - even if it is someone who is not very familiar with our system. the main benefit in my opinion is that once an AI has been designed it is easy to add onto it and adapt it for other purposes… what I would start with is a sentence deconstruction function. This would allow it to understand the same thing said in different ways.
local function breakdown(input) --[Breaks long strings into sentences]
local sentences={}
local intlast=1
while true do
local found={string.find(input,'. ',intlast,true)}
if found[1]==nil then
break
else
table.insert(sentences,string.sub(input,intlast,found[2]-2))
intlast=found[2]+1
end
end
if intlast<#input then
table.insert(sentences,string.sub(input,intlast,#input))
end
return (sentences[1] and sentences) or nil
end
local function breakdown2(input) --[Breaks sentances into words]
local sentences={}
for k,v in pairs(input) do
table.insert(sentences,{})
sentences[#sentences]['string']=v
for word in string.gmatch(v, "%a+") do
table.insert(sentences[#sentences],word)
end
end
return (sentences[1] and sentences) or nil
end
for a,b in ipairs(breakdown2(breakdown('sentence one. sentence two. Sentence three'))) do
for k,v in ipairs(:P/>/> do
print(v)
sleep(0.5)
end
sleep(2)
end
then you have a tables of words, a table for subject defining words like 'the', a table for action defining words like 'do', a table for definition creating words like 'is' etc.
The computer breaks down the string into sentences comprised of words, breaks those words into verbs and nouns and eventually understands exactly what you are trying to say. you should also have a detailed debugging system where if it has any problems it tells you it cannot understand and shows you what it has managed to work out, then you can tell it what a word is (add it to one of the tables) so it recognises it in future
after my computer can understand me I would then start working on the learning part
PS. @BigSHinyToys: Perhaps you could include something like this in your speech program, it is amazing as it is and I do not know if you have implemented it already, just a suggestion
EDIT: you will also have to make a definition for every action so if the action is 'follow' then it executes a function you teach it to do when told to do this. if the word is a defining word like 'is' then it adds the subject=definition to a table for future reference etc. there is a large amount of teaching that will have to be done before you can talk to it coherently :)/>/>
Posted 14 September 2012 - 08:09 AM
See, I think you're right. It would be very hard to make what most people consider to be an AI. But consider this: we see AIs everywhere in video games. Mostly, we see it in pathfinding. When we see those little testificates detect that it is night, and run inside, that is a pre-programmed response. But put something in their way, they will either jump over it, or move around it. Normally, this can't be done with a basic turtle programming, cause it will "bump" into the wall repeatedly until you stop it and tell it to turn around.
I'm going to throw in my two cents here (and ruin it for everyone :)/>/>) and say that pathfinding is not artificial intelligence. Finding a method from travelling from one point to another isn't AI, it's just following A*. The AI in that sort of behavior is deciding where to move to- the basis of this however is still usually not AI either, it's just a series of more complicated algorithms with weighted heuristics and some random behaviors added for variation. How a traditional, connectivist AI might tackle this is choose points relatively randomly, creating a connected graph of all points it can move to. The movement points which lead to the highest success rate (doing more damage to the player or killing the player) would increase the weightings and consequently the chance of moving to that given point, until eventually a much smaller set of "optimal" points have been achieved. That's approaching artificial learning.
So that might look like:local points = { ... } --All available points, populated at startup function moveToPoint(index) local path = points[index] --pathfinding logic here return moveSuccess --If our move was successful (dead player etc.) end function normalizeHeuristics() local sumH = 0.0 for i=1,#points do sumH = sumH + points[i].H end for i=1,#points do points[i].H = points[i].H * (1.0/sumH) end end function choosePoint() normalizeHeuristics() --This could be more sophistocated, if need be local chosenH = math.random() local sH = 0 for i=1,#points do sH = sH + points[i].H if chosenH <= sH then moveToPoint(i) break end end end
That's a very shoddy implementation- in reality you'd want a large connected graph rather than just a set of points, so the turtle can choose optimal paths with weightings at each intersection, a little like how BigSHinyToys did above.
–SNIP–
I would recommend storing all paths taken in layered tables, you start with a table, then you create another table in that table for every available choice, if you choose one when you populate that table with more tables of resulting possibilities etc, that way the turtle can follow a branching tree of paths and then if it reaches a dead end it will note that in the current table as the only possible path. this is only applicable for maze navigation or other finite path orientated navigation, if it needs to make its way through a large open space it will not be so effective (it will still work but you will end up with so many tables it would be ridiculous), in this case as the turtle moves it should create a table per open cell it can occupy and populate that table with options (ordered by direction of course) and then make an algorithm that parses through the tables finding possible routes
Posted 16 September 2012 - 05:12 AM
My friend had a learning bot website, and he was able to make a version of it for this. Is this what you guys are talking about making? :
[youtube]http://www.youtube.com/watch?v=62VsHwgkU3w[/youtube]
[youtube]http://www.youtube.com/watch?v=62VsHwgkU3w[/youtube]
Posted 16 September 2012 - 07:07 AM
Any kind of AI, that would classify as long as it actually learns based on what it is told
Posted 16 September 2012 - 07:45 AM
That is really neat! Has this been posted on the forums yet? If not, it should!
Posted 16 September 2012 - 04:23 PM
I'll talk to him. I don't think he has given out the program yet, but I'm sure he'd be happy to.
Posted 17 September 2012 - 03:25 AM
I know humans who have less cohesive conversations than that :)/>/>
Posted 19 September 2012 - 12:09 AM
What is Hikari?:)/>/> I might participate?
Lol, I think this all started after I posted Hikari xD
Posted 23 September 2012 - 03:46 AM
My troll AI:Spoiler
local t = 0 local c = 0 term.clear() term.setCursorPos(1,1) function complain() if c &gt; 4 then c = 0 end if c == 0 then print("AI&gt; What aren't you talking to me?") end if c == 1 then print("AI&gt; Stop it!") end if c == 2 then print("AI&gt; You're being a jerk!") end if c == 3 then print("AI&gt; Alright fine. I won't talk to you either!") end if c == 4 then print("AI&gt; That's it! Bye!") error("ragequit") end end function thanks() if t &gt; 4 then t = 0 end if t == 0 then print("AI&gt; Okay. Thanks.") end if t == 1 then print("AI&gt; Oh cool.") end if t == 2 then print("AI&gt; Thanks!") end if t == 3 then print("AI&gt; Alright.") end if t == 4 then print("AI&gt; Never mind...") end c = 0 end print("AI&gt; Hello!") while true do write("ME&gt; ") message = read() if message == "" then complain() c = c + 1 else print("AI&gt; What does '"..message.."' mean?") write("ME&gt; ") message = read() if message == "" then complain() c = c + 1 else thanks() t = t + 1 c = 0 end end end
Hehe…
EDIT: Changed some of the code.
My profile image is an image of this crazy AI i am trying to make it learn things.
–edit–
well i make it like so:
computer says "Hello!"
if you say a word and the computer
didint know it gonna say "What I say when you say (Message you wrote)"
it is going to memorise and if you say again it is going to say what
it has learned.
Link: http://pastebin.com/npTimuRJ
Posted 23 September 2012 - 10:06 PM
since time immemorial, humans had dreamed of creating life in the likeness of it and see it evolve …
I think, to make an AI system in minecraft is just as possible as outside of it, thanks to the vast expansion of anced by minecraft worlds, it would be possible to create a structure that is assimilated to a "small" brain or an accumulator experience, thanks to the different forms of input / output available to the game, CCSensors, turtles, wifi, modems, computers, and creating possibilityrealtime database and to modify lines of code or entire programs.
i was working at GM (General Motors - Opel Spain) and the zombies, but responded to some programs, if they had some relation to external aspects, could "AutoCalib" and do their tasks more effectively.
I agree with many people, creating a system with IA, should be a must for anyone who loves to program, because the mere fact of creating life, is always the best of nature :P/>/>
I think, to make an AI system in minecraft is just as possible as outside of it, thanks to the vast expansion of anced by minecraft worlds, it would be possible to create a structure that is assimilated to a "small" brain or an accumulator experience, thanks to the different forms of input / output available to the game, CCSensors, turtles, wifi, modems, computers, and creating possibilityrealtime database and to modify lines of code or entire programs.
i was working at GM (General Motors - Opel Spain) and the zombies, but responded to some programs, if they had some relation to external aspects, could "AutoCalib" and do their tasks more effectively.
I agree with many people, creating a system with IA, should be a must for anyone who loves to program, because the mere fact of creating life, is always the best of nature :P/>/>
Posted 24 September 2012 - 01:43 AM
Well said. I agree.since time immemorial, humans had dreamed of creating life in the likeness of it and see it evolve …
I think, to make an AI system in minecraft is just as possible as outside of it, thanks to the vast expansion of anced by minecraft worlds, it would be possible to create a structure that is assimilated to a "small" brain or an accumulator experience, thanks to the different forms of input / output available to the game, CCSensors, turtles, wifi, modems, computers, and creating possibilityrealtime database and to modify lines of code or entire programs.
i was working at GM (General Motors - Opel Spain) and the zombies, but responded to some programs, if they had some relation to external aspects, could "AutoCalib" and do their tasks more effectively.
I agree with many people, creating a system with IA, should be a must for anyone who loves to program, because the mere fact of creating life, is always the best of nature :P/>/>
Posted 10 January 2013 - 07:02 PM
I tried to program a chatbot (which fits your definition of AI) in Java once… It didn't work (lost interest).
Might try again sometime…
EDIT: One problem I can see with this (not a chatbot, but with "understanding" things) is language parsing.
Craft a pickaxe like this
A pickaxe is crafted like this
This is how you craft a pickaxe
You see this? This makes a pickaxe
You see this pickaxe? This is how you make it
etc.
Might try again sometime…
EDIT: One problem I can see with this (not a chatbot, but with "understanding" things) is language parsing.
Craft a pickaxe like this
A pickaxe is crafted like this
This is how you craft a pickaxe
You see this? This makes a pickaxe
You see this pickaxe? This is how you make it
etc.
Posted 10 January 2013 - 07:24 PM
Key word search is a common way of interpreting meaning. If i was making it I would search for "pickaxe", "craft", "make" and 'learn' the input as relational to those keywords.EDIT: One problem I can see with this (not a chatbot, but with "understanding" things) is language parsing.
Craft a pickaxe like this
A pickaxe is crafted like this
This is how you craft a pickaxe
You see this? This makes a pickaxe
You see this pickaxe? This is how you make it
etc.
Posted 10 January 2013 - 07:59 PM
I was thinking the same thing. Probably worth mentioning to the people who are trying to make that in-game 'Siri' program. Actually, I might give this a shot sometime later. Not sure.Key word search is a common way of interpreting meaning. If i was making it I would search for "pickaxe", "craft", "make" and 'learn' the input as relational to those keywords.
Posted 10 January 2013 - 08:01 PM
Tell the ones that don't use wolframalpha ;)/>I was thinking the same thing. Probably worth mentioning to the people who are trying to make that in-game 'Siri' program. Actually, I might give this a shot sometime later. Not sure.Key word search is a common way of interpreting meaning. If i was making it I would search for "pickaxe", "craft", "make" and 'learn' the input as relational to those keywords.
Posted 10 January 2013 - 11:05 PM
You still wouldn't be able to get around the fact that different sentences can have the same words but in a different order, and have a completely different meaning.Key word search is a common way of interpreting meaning. If i was making it I would search for "pickaxe", "craft", "make" and 'learn' the input as relational to those keywords.
Posted 10 January 2013 - 11:16 PM
and sadly that is the draw back of the system…… have you ever used Siri? or Google Translate? Or Wolframalpha with a really obscure search?You still wouldn't be able to get around the fact that different sentences can have the same words but in a different order, and have a completely different meaning.Key word search is a common way of interpreting meaning. If i was making it I would search for "pickaxe", "craft", "make" and 'learn' the input as relational to those keywords.
Posted 11 January 2013 - 10:33 AM
ahhh why so many people questioning what an ai is…surely if you want someone to make something you should know what that is and not care about the name
making something that can learn is easy…making something that can interact with that stuff is harder…and making something that doesnt need to be taught to learn is what i think a true ai is i.e. it can teach itself and guess…but there is no way of doing this in cc i think
everyone should try to challenge theirselves and if you are at a stage where the challenge is making an ai then the person should try that
i could to a pathfinding turtle easily but whats the point? i have no need for it…and its not a challenge…but a program that can tell if a word is another form of an infinitive or something would be a challenge so i would give that a go which is an ai but more importantly gives me a better understanding of coding
this is the longest post i have ever done omg
making something that can learn is easy…making something that can interact with that stuff is harder…and making something that doesnt need to be taught to learn is what i think a true ai is i.e. it can teach itself and guess…but there is no way of doing this in cc i think
everyone should try to challenge theirselves and if you are at a stage where the challenge is making an ai then the person should try that
i could to a pathfinding turtle easily but whats the point? i have no need for it…and its not a challenge…but a program that can tell if a word is another form of an infinitive or something would be a challenge so i would give that a go which is an ai but more importantly gives me a better understanding of coding
this is the longest post i have ever done omg
Posted 11 January 2013 - 02:53 PM
(on the flip side of that coin)have you ever used Siri? or Google Translate? Or Wolframalpha with a really obscure search?
have you ever used Jabberwacky? Slightly different idea, but it's more of a "AI" (it learns), and a combination of the two might work.
>[…] is how you make a pickaxe.
I don't know how to make a pickaxe.
>That's not what I meant.
What did you mean?
1) set: pickaxe - recipe
2) get: pickaxe - recipe
etc.
Posted 11 January 2013 - 04:21 PM
(on the flip side of that coin)have you ever used Siri? or Google Translate? Or Wolframalpha with a really obscure search?
have you ever used Jabberwacky? Slightly different idea, but it's more of a "AI" (it learns), and a combination of the two might work.
>[…] is how you make a pickaxe.
I don't know how to make a pickaxe.
>That's not what I meant.
What did you mean?
1) set: pickaxe - recipe
2) get: pickaxe - recipe
etc.KindaQuite complicated, but it could work…
Yes quite complicated, but would be VERY effective once complete, still uses keyword search, but could be good. main floor with the learning is data structures would get quite large and cumbersome, and need to be stored somewhere ( so that sets a max dictionary size, since in CC the storage space has a limit )… on the plus using dictionary lookups could be one way to fix the searching of the large data structure, doesn't fix the file storage issue though… it would like have to migrate some of its data onto another computer and use it as a database asking "do you have something matching this"… now that would be truly awesome AI… taking over other computers when required for operation…
Posted 11 January 2013 - 04:27 PM
Maybe a global database? HTTP or server-specific?
Posted 11 January 2013 - 04:38 PM
private server with a jsp page that accesses a MySQL database……… could work!Maybe a global database? HTTP or server-specific?
Posted 11 January 2013 - 05:31 PM
I'mma give it a shot, why not? I already made Siri in-game, and the AI can be the next big stepprivate server with a jsp page that accesses a MySQL database……… could work!Maybe a global database? HTTP or server-specific?
Posted 11 January 2013 - 06:09 PM
good luck… I can give a hand with it all if you wish (inbetween my other projects of course)I'mma give it a shot, why not? I already made Siri in-game, and the AI can be the next big stepprivate server with a jsp page that accesses a MySQL database……… could work!Maybe a global database? HTTP or server-specific?
Posted 08 February 2013 - 04:25 PM
If an AI is actually learning, it shouldn't just memorize, it should think. Thinking is hard to define, to me it is creating ideas, and not a mapping of input that it stores to have that are 'learned'. And think, is Commander Data a question. The idea of in AI requires a lot of philosophical thinking, because it requires us to define things not provable. The thing I would define is consciousness, if you believe consciousness is just a bunch of matter and no more than it would be easily possible to re-create a consciousness; but if you think life is something more, than consciousness is impossible to recreate, I personally believe the former. Recreation of consciousness may sound completely different, but I believe the only true intelligence is conscious, otherwise it uses a way of figuring out past information and taking the circumstances and finding the most probably thing and using deduction and stuff find what is happening, this is a way to work out something but not to make it think. Thinking is creativity, creating of things, not combing previous instances and using probability and stuff. The idea of an AI is great, it makes you think about things and stuff. I like how you say it is a great goal to set. To get to it will teach you many things about the language in which you try to accomplish this, and will give you a large amount of experience.
TLDR : Mapping of input to output AI, AI Creativity for the AI
To me creativity = ability to create thoughts on your own.
TLDR : Mapping of input to output AI, AI Creativity for the AI
To me creativity = ability to create thoughts on your own.
Posted 08 February 2013 - 06:24 PM
the reason this is impossible to do in ComputerCraft, or in your IRL home computer for that matter, is memory and speed. ComputerCraft isn't granted enough memory and processor time to make any sort of significant AI
unless you have a supercomputer at home and a BUNCH of time to write algorithms to divy up the processer load among each subunit, this is going nowhere
EDIT: also note that people have been trying this since the 40s
unless you have a supercomputer at home and a BUNCH of time to write algorithms to divy up the processer load among each subunit, this is going nowhere
EDIT: also note that people have been trying this since the 40s
Posted 08 February 2013 - 11:39 PM
Every time a major breakthrough is made and a problem that was previously classed as "AI" is solved, the definition of AI changes. For instance, it used to be believed that a computer that played chess would be an AI. Now that that problem has been solved, no-one considers a chess playing computer to be an AI. So rather than computer memory and speed being the problem, it's the definition. "Make an AI" is impossible because of that, it's a problem that has no definition. And even if you can find a definition to go with, then since it hasn't been solved by the world's best artificial intelligence researchers on the best hardware in the world, it isn't going to be solved by a Minecraft player in ComputerCraft.the reason this is impossible to do in ComputerCraft, or in your IRL home computer for that matter, is memory and speed. ComputerCraft isn't granted enough memory and processor time to make any sort of significant AI
…
EDIT: also note that people have been trying this since the 40s
Posted 13 February 2013 - 02:53 AM
My AI is in my signature
Posted 13 February 2013 - 03:29 AM
Nah, I disagree. I think it's good enough to be able to make Tetris :lol:/>I know it sounds daunting, but making an AI should be the goal of any programmer/scripter worth their salt.
Posted 13 February 2013 - 03:46 AM
True, but to make something that can find it's own way through an environment is what could be called an AI (at least, whithin games anyway)
Posted 13 February 2013 - 04:21 AM
Well yeah, I never really disagreed on that, lol.True, but to make something that can find it's own way through an environment is what could be called an AI (at least, whithin games anyway)
Oh hey, how about a Tetris AI?
Posted 13 February 2013 - 04:56 AM
But how would that work really? I would assume it would have to be in a multiplayer setting with finding out where to place a piece. But that would be more of an algorithm rather than an AI. I think an AI in a game would be more like having NPCs navigate around, doing things, kind of like giving them a task, and having them figure out how to complete that task.
Posted 13 February 2013 - 05:12 AM
This article may be of interest to some here.But how would that work really? I would assume it would have to be in a multiplayer setting with finding out where to place a piece. But that would be more of an algorithm rather than an AI. I think an AI in a game would be more like having NPCs navigate around, doing things, kind of like giving them a task, and having them figure out how to complete that task.
http://hackaday.com/2013/01/29/genetic-algorithms-become-programmers-themselves/
Using a simple language was the key to his success. It would be nice to see somthign like this on a larger scale and with more programs running at the same time in a "community"/"environment" (possible minecraft) driven by biological pressures food,survival,reproduction .
Posted 13 February 2013 - 05:16 AM
I suppose so - a "bot" in a game like Counter Strike or Quake is usually referred to as having "AI" routines. "EI" for "Emulated Intelligence" or "SI" for "Simulated Intelligence" would be a more accurate term, but "AI" has stuck.True, but to make something that can find it's own way through an environment is what could be called an AI (at least, whithin games anyway)
The original post really needs to be a bit more specific though. "AI" is just way too huge and non-specific to issue as a challenge.
Posted 13 February 2013 - 05:27 AM
True. I guess what I was really looking for is a more advanced logic for CC.I suppose so - a "bot" in a game like Counter Strike or Quake is usually referred to as having "AI" routines. "EI" for "Emulated Intelligence" or "SI" for "Simulated Intelligence" would be a more accurate term, but "AI" has stuck.
The original post really needs to be a bit more specific though. "AI" is just way too huge and non-specific to issue as a challenge.
Posted 13 February 2013 - 02:18 PM
A true AI should have true error too. Like in a game, it shouldn't be simulated error, but true error that it did something wrong, not a from a chance that it may fake an error, to seem real, or not to make the gane extremely hard.
Posted 13 February 2013 - 02:24 PM
Well, no matter what, the errors that an AI makes, unless scripted(or highly regulated), will most likely result in total system failure.
Posted 13 February 2013 - 03:16 PM
A true AI should have true error too. Like in a game, it shouldn't be simulated error, but true error that it did something wrong, not a from a chance that it may fake an error, to seem real, or not to make the gane extremely hard.
I am no expert in AI, but this doesn't seem quite right to me. Unless the goal of an AI is to simulate the human brain as closely as possible and NOT to create a superior, infallible logician, then true error would not be a desired trait. And that is not to mention the fact that machines cannot think in any other language than logic, true error wouldn't really be "true error" in the first place: it would be the error of the programmer.
By true error, I am assuming you mean accidental logic errors, so please correct me if I'm wrong.
Edit: Of course, in terms of morals there will always be "true errors" when it comes to artificial intelligence due to the fact that many morals which humans have are not always a rational thing but rather just a "feeling" that you should or should not do certain things. By teaching an AI morals, you might actually be teaching them faulty logic.
One more thing: When it comes to logic, how can we ever be sure that anything is 100% accurate? It may be "logically accurate", but is it "morally accurate"? Has it considered ALL of the data available? (a lack of considered data seems most likely to me the largest reason for non-logical arguments in humans) In short, I don't believe that anything can ever achieve 100% accuracy. With logic, one can just about come to any conclusion they wish depending on what input knowledge you are given to work with, and that is something that AI would struggle with. The possibilities are infinite.
Take for example the stereotypical scenario of an AI "human termination". The AI somehow came to the conclusion that getting rid of all humans was a good thing, despite the fact that humans really have no negative effect on an AI's task (thinking). A possible reason that humans might want a termination of a species would be so that we could use the resources which are consumed by that species in order to further extend our race. But AI's wouldn't really have that need to "reproduce" (or would it? Would it think that more resources are necessary in order to 'think' more? And therein lies one of the issues when trying to comprehend AI logic). So what did trigger this human termination? What leap of twisted logic would it have to make, and would the input data all have been considered?
Yeah I'm pretty much just spitting out my thoughts, no real factual evidence behind this other than what a fallible human mind has concluded from observation. Take everything I say with a grain of salt.
Posted 13 February 2013 - 04:04 PM
That was a very well thought out post there, Bubba. I enjoyed reading your opinion. I don't think Lua, or even Computercraft for that matter is even capable of 'true AI', in the sense that it will be able to do anything that a human can given enough time to learn. I think the best we can hope for is a 'game AI' where the most we can do is navigate and evaluate the surroundings.
Posted 15 February 2013 - 08:46 AM
this is my idea of an AI:
this will need CCsensors or openCCsensors
you will have a server computer and a "baby" turtle, this turtle will do what ever you do, if you move foreward he moves foreward. he also has to detect when you are not moving so that the diffrent movements can be saved for later use. when it has learned enough it will start executing the movements and actions depending on diffrent events. these events are also save at the learning stage. this will make it so that you can teach it what to do and when to do.
btw the server has the peripheral connected. it uses rednet to comminicate with the turtles.
later on you could make it to the point where the turtle crafts other turtles and let the AI put on it. the new turtle will learn from the old turtle. this will make it so that in the end you is a city of self behaving turtles.
this will need CCsensors or openCCsensors
you will have a server computer and a "baby" turtle, this turtle will do what ever you do, if you move foreward he moves foreward. he also has to detect when you are not moving so that the diffrent movements can be saved for later use. when it has learned enough it will start executing the movements and actions depending on diffrent events. these events are also save at the learning stage. this will make it so that you can teach it what to do and when to do.
btw the server has the peripheral connected. it uses rednet to comminicate with the turtles.
later on you could make it to the point where the turtle crafts other turtles and let the AI put on it. the new turtle will learn from the old turtle. this will make it so that in the end you is a city of self behaving turtles.
Posted 19 February 2013 - 01:14 AM
I'm a computer games programmer (professionally) and know a fair bit about (computer game level) AI. And basically, there's nothing intelligent about it, they almost never have the ability to learn, and when they do they can only learn in limited ways that they have been pre-programmed to learn.
Most of the examples I've seen on the past few pages of this thread of "learning AI" aren't AI at all, they're databases! Particularly the example in this post: http://www.computerc...dpost__p__31818
That's not learning, it's just data storage, retrieval and manipulation.
"Learning" is being able to have an idea, try it out, fail or succeed and learn from that. True "learning" is impossible without original thoughts.
I also take offence at your claim that "anyone who has SOME skill with coding/scripting should aspire to make an AI." You are saying that I have no skill with programming.
Most of the examples I've seen on the past few pages of this thread of "learning AI" aren't AI at all, they're databases! Particularly the example in this post: http://www.computerc...dpost__p__31818
That's not learning, it's just data storage, retrieval and manipulation.
"Learning" is being able to have an idea, try it out, fail or succeed and learn from that. True "learning" is impossible without original thoughts.
I also take offence at your claim that "anyone who has SOME skill with coding/scripting should aspire to make an AI." You are saying that I have no skill with programming.
Posted 19 February 2013 - 01:28 AM
It could be argued that all humans do is process input through sensors then store and manipulate that data using it to decide the next course of action.I'm a computer games programmer (professionally) and know a fair bit about (computer game level) AI. And basically, there's nothing intelligent about it, they almost never have the ability to learn, and when they do they can only learn in limited ways that they have been pre-programmed to learn.
Most of the examples I've seen on the past few pages of this thread of "learning AI" aren't AI at all, they're databases! Particularly the example in this post: http://www.computerc...dpost__p__31818
That's not learning, it's just data storage, retrieval and manipulation.
"Learning" is being able to have an idea, try it out, fail or succeed and learn from that. True "learning" is impossible without original thoughts.
I also take offence at your claim that "anyone who has SOME skill with coding/scripting should aspire to make an AI." You are saying that I have no skill with programming.
The problem with AI is the programmer decides how the program learns it learns by a set method if it learned how to learn it would then be able to adapt.
Posted 19 February 2013 - 01:52 AM
Humans have a set of inputs and outputs and the ability to see correlations between inputs, and between outputs and subsequent inputs. But the brain isn't hard-wired for what any of the inputs or outputs actually do or mean (except a couple are wired to "unhappy", e.g. pain sensors).
For true intelligence from a program you'd have to just give it a pool of inputs and outputs, the ability to correlate inputs with each other and outputs with inputs, and then give it a reason to do anything (in humans this is arguably happiness and unhappiness) and let it work out how it's legs work.
Congrats, one baby. Good luck making it beyond that.
For true intelligence from a program you'd have to just give it a pool of inputs and outputs, the ability to correlate inputs with each other and outputs with inputs, and then give it a reason to do anything (in humans this is arguably happiness and unhappiness) and let it work out how it's legs work.
Congrats, one baby. Good luck making it beyond that.
Posted 19 February 2013 - 02:07 AM
That is an interesting perspective.
So strap a FPGA to a pair of motors and couple of cameras for input and see what happens.
So strap a FPGA to a pair of motors and couple of cameras for input and see what happens.
Posted 19 February 2013 - 02:40 AM
You obviously read into that statement very wrong. I meant that anyone who has some good skill with programming, should want to make some sort of AI. Through all of the definitions. I never said that those who do not try are bad programmers. I want to make one, but I just don't think I will ever do anything with it.I also take offence at your claim that "anyone who has SOME skill with coding/scripting should aspire to make an AI." You are saying that I have no skill with programming.
Posted 19 February 2013 - 09:27 AM
A lighthearted implementation of an "AI", with bonus xkcd reference:
while true do
read()
print("So it has come to this.")
end
Posted 20 February 2013 - 05:26 PM
I give it a math.huge() out of 10A lighthearted implementation of an "AI", with bonus xkcd reference:while true do read() print("So it has come to this.") end
Posted 20 February 2013 - 05:33 PM
Dam that was hard to find.
http://xkcd.com/1022/
There are too many things on that site related to AI.
http://xkcd.com/1022/
There are too many things on that site related to AI.