Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Evolutionary Algorithims
#11
cool exam(all of ours are just written tests). Were can i find a Prolog interpeter(I googled it and couldnt find it).

Ya and im interested in knowing what a WERE/WHAT/WHEN/WHY interpeter is.
pen your other eyes.........
Reply
#12
That was on our last chapter, so I guess it is advanced stuff. You should learn the basics first. I'll try to dig for info and tutorials, just keep tuned.

A good prolog interpreter (free) is SWI Prolog. It has a Windows port that works fairly well. http://www.swi-prolog.org/
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#13
Quote:cool exam(all of ours are just written tests). Were can i find a Prolog interpeter(I googled it and couldnt find it).

Ya and im interested in knowing what a WERE/WHAT/WHEN/WHY interpeter is.

You might want to try here:
http://pauillac.inria.fr/~diaz/gnu-prolog/

Edit: Darn... three minutes slow. Tongue
Reply
#14
Has anybody ever read the book prey(great book). That book was what made me want to start AI. i was wondering if prolog could write evolutionary algorithims.

Kinda like making a program and then running it and everytime it is run due to different random circumstances the outcome is always different. that is probaly realy advanced but that is were i want to end up.

Or maybe using low level intellegence(like birds flocking is a result of all the birds thinking "stay close to the bird next to you but dont bump into them) to write a AI program and just see were it takes you.

Please tell me if any of this is possible and if it is hard to do.



PS. How do you spell algorithm
pen your other eyes.........
Reply
#15
I don't think true AI would ever be possible the way we're going at it. AI can't be coded because you'll never know if the conscienceness you created is an outcome of many conditional statements that recieves data and outputs it in ways we can understand. The being would have to learn about its surroundings from the begining like we humans have done since birth. But who knows, maybe we are simply an automaton where our conscienceness can be mapped out in one gigantic flow chart.

qbiscool: Yes, I think that is how you spell algorithm
Reply
#16
Nathan is right: you shouldn't use QB for this.

Lisp would be great, but so would C++/C#, in that it would be easier to hook you AI code to a game (not to say it is impossible using Lisp, of course). QB doesn't have lots of features (like classes) that makes dealing with this stuff easier. Wow, imagine a neural net in QB! That would be one big mess.
Reply
#17
Quote:I don't think true AI would ever be possible the way we're going at it. AI can't be coded because you'll never know if the conscienceness you created is an outcome of many conditional statements that recieves data and outputs it in ways we can understand. The being would have to learn about its surroundings from the begining like we humans have done since birth. But who knows, maybe we are simply an automaton where our conscienceness can be mapped out in one gigantic flow chart.

I think the only way to really create AI is to use low level rules.
(ie. birds dont flock becuase its there instinct. they flock south becuase of certain low level rules like "if its cold start flying" or "stay close to the bird next to you but dont bump into them.)
or how termites create there mounds. they create extreamly complex mounds with a place for fresh oxegen, a place to remove C02 , and a place to get heat from and its all based on low level rules (like if a termite has been here drop a dirt pellet).

This is the best way becuase with a few simple lines of code you will get a unpredictable program and if you add a few random chances you will get a different program outcome each time.
But the only way to code this kind of AI is to use a distributive proccess with multiple programs, computers, or agents.

If you had a problem you could just let the program solve it for you by adding a few of these low level rules.
pen your other eyes.........
Reply
#18
[joke]
Or you could just create an entire universe and just have atoms.

"Few" rules, very simple to implement, and youre safe :lol:
[/joke]



I tried making an AI once, I had a type saying stuff like mass, velocity, legs and such...

Then i made my "creatures" ponder around a map, "learning" where to eat and what to eat, ie, brown was dirt, but the creature didn't know that, so ift tried to eat it, it don't get less hungry so dirt gets a lover "score" this went quite well actually.

It ended with a small flock of "grass eaters" (green pixels) and some "predators". The herding was a side effekt that come of the: 'Attack if weaker' statement, the herd is tronger than the lone predator.

It was kinnda cool to see, unfortunately the code is on my old HDD (a 125MB Tongue ) and I can't get it to work Cry


But it would be farily "simple2 to write an AI, as long as you give it some boundries, in my code it was animals, so I knew in general what was needed.

Making a "universal" AI like ur mind (*drools*) is impossible. It canät be done, we can't recreate the logics of human thinking, simply because there is no logic, everyone thinks differently and reason in different ways.

So make it an AI targeted for a specific field, and it's feasable.


(lot's of ramblings, if anything is completely wrong just ignore it, I'm tired)
Reply
#19
Depends on what AI you want to make.

Quote:..... heuristic programming, which means that the program "learns" from previous experiences.

No, that's not right at all. Heuristic programming is when the AI uses heuristics to search. Heuristics are things that you know about the search that could make it easier for the AI to search: specific opening moves in chess games for example.

Genetic algorithm is very possible in QB. There are many versions of genetic algorithm, but this is the one that is easiest to implement (in QB):

[line number]: IF [some state] THEN {[GOTO [line number1]], [set some state 1]} ELSE {[GOTO [line number 2]], [set some state 2]}

You have N of these lines per "program", or you have a pool of common lines for all programs, or both.

Each "program" has a set of lines that it executes one after the other by following the GOTO rules, and when there is no GOTO in that line, it simply goes to the next line. You can give each program a line execution limit (ie: how many lines it can execute before the next program starts executing), or you can let each program run to the end of the last line. This is not recommended because you will end up with infinite loops. Smile

You define a bunch of arrays for each program and the associated lines.

You also need to define what each possible input and output state is. You can also have intermediate steps. Example:

CONNECT 4
INPUT STATE:
byte string (or integer array) that determine the amount of chips in each column.

OUTPUT STATE:
one byte that says where to put the next chip.

There are many different ways to structure the input and output states as well as the array that will allow each "program" access. I like putting the input state, output state, and intermediate state(constant) in one big string, for instance:

110001110110011011 1111110101 101
input state, intermediate/constant state, output state

Each line accesses the values of strings of bits in the string to determine their T/F value. Then, the output state is read off the end and it's the next player's turn.

THEN, you need to figure out a way to recombine each program to make "new" programs. There are BILLIONS of ways to do this. For instance, you can get the top 50% programs and then you can randomly merge them with each other to create another 50% (while the bottom 50% are erased), leaving the initial top 50% intact. You can also have a merging pattern for each program which says what bits should be left behind and what bits should be copied over. You can also have it stay somewhat random and also depend on the relative wins for each program.

You can merge two programs at a time, three at a time, or you can merge each program with all the other programs. There are many ways to do it!

You REALLY need a CLEAR understanding of the input and output states and the FRAMEWORK of your program/game/puzzle/question to be able to do this correctly. STRUCTURE your output in SUCH A WAY so that the output is ALWAYS possible: for connect 4, for example, an output to a filled column should not be allowed.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#20
Quote:qbiscool wrote: I think the only way to really create AI is to use low level rules.
I believe that's our only hope. It would be an evolution process. Life is so diverse because of the incredibly complex flux in biological ecosystems and physical phenomena. All we are is one manifestation of adaptative process. It's crazy that evolution created the mind. I hear it's more complex than the universe itself. But it was given to us through evolution for the mere fact of survival. All our biological adaptations are yielded for defensive purposes.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)