Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
2 registered members (3run, AndrewAMD), 667 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 5 1 2 3 4 5
Re: Genetic Algorithms and Games [Re: bstudio] #115152
03/09/07 11:51
03/09/07 11:51
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Quote:

Sort of like a new born baby, learning to do stuff on its own, from the day it's born..


as soon as u started this thread and i read it, i was having fantasies about doing this myself

good luck buddy

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: Genetic Algorithms and Games [Re: PHeMoX] #115153
03/24/07 22:50
03/24/07 22:50
Joined: Oct 2006
Posts: 1,245
A
AlbertoT Offline
Serious User
AlbertoT  Offline
Serious User
A

Joined: Oct 2006
Posts: 1,245
I am myself interested in GA ,neural network and all AI stuff
My only concern is that coomercial games dont' actualy make use of them
apart simple FSM'S
Are you aware of games, even not commercial hits, which have implemented sophisticated A.I. Algo's ?

Re: Genetic Algorithms and Games [Re: AlbertoT] #115154
11/24/07 18:04
11/24/07 18:04
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
I never heard about GA, but it's cool. I will see how far i can get into it...But after this thread i will take my (old) RCX out of my locker and look what for things i will invent^^

Re: Genetic Algorithms and Games [Re: Scorpion] #115155
11/25/07 11:05
11/25/07 11:05
Joined: Jan 2003
Posts: 4,305
Damocles Offline
Expert
Damocles  Offline
Expert

Joined: Jan 2003
Posts: 4,305
I have made a search algorythm, that is a kind of genetic algorythm
(genetic code with mutation, reproduction and selection of the fittest)

http://www.coniserver.net/ubbthreads/showflat.php/Cat/0/Number/789548/an/0/page/4#Post789548

There are many ways to apply this logic.
You can even make such an algorythm program something automatically (write programcode)
as long as you have a good way to evaluate the results.

http://en.wikipedia.org/wiki/Genetic_programming

Re: Genetic Algorithms and Games [Re: AlbertoT] #115156
11/25/07 22:13
11/25/07 22:13
Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...
Andreas C Offline
Senior Member
Andreas C  Offline
Senior Member

Joined: Sep 2001
Posts: 375
Hamburg, Germany / Springfield...

There's a "game" called CREATURES (quite old by now) that implemented some pretty sophisticated AI/GA stuff. There are some websites that have some more info on this (the one I can think of right now is www.germancreatures.net ... it's in German though ...)

Somewhere there are also some in-depth articles about the technology (the guy who programmed CREATURES 1 & 2 spent quite a bit of time on getting the creatures to "live").

Cheers,
Andreas


____________________________________________________
GameCore / Unity / UDK
Lightwave 9.6 / Blender / Fragmotion / ZBrush 3.5
TextureMaker / PSP-X
Re: Genetic Algorithms and Games [Re: Andreas C] #115157
12/04/07 20:15
12/04/07 20:15
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
Larry , I'd suggest you have a look at microcontrollers & programming of those. You could easely build a robot from scratch wich would be fully programmable and actualy pretty easely programmed.
As for the Genetic Algorithyms , Neural Networks and Finite State Machines...I'm thinking about those for years , since the first time I heared about Neural Networks. After some reading recently I think I'm getting close to a true learning AI. Neural Networks in concept are very powerful , but in depth they're actualy a way for mathematicians to express their algorithyms (is it just to be 'fancy' I dont know). Genetic Algorithyms are presented to the world in the opposite direction , as a 'problem solving' method , wich is wrong for the concept. It should be the 'brain' that solves a problem , the GA should only pick the ones that sovle the problem better and mix them to make them even better.
As for Finite State Machines , you all say they're simple Are they ? I think the answer of learning is in there. A Finite State Machine is some simple If Else statements , but what if you actualy change the 'situation' under wich If operates. If you instead of 'state' use a value , wich you could change ? If you combine this with a concept of Neural Networks , to arrange the diffrent 'neurons'(If-Else in this example) in such a way to actualy make an AI evaluate a situation and produce a response ? IMHO , combined with GA's to select the 'best' evaluating & performing AI's it'll produce a very powerful AI wich actualy doesnt consist of neighter a defined GA , Neural Net or Finite State Machine (It only uses the concept of those). Dont you agree ?


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: Genetic Algorithms and Games [Re: EpsiloN] #115158
12/05/07 14:26
12/05/07 14:26
Joined: Jul 2004
Posts: 1,205
Greece
LarryLaffer Offline OP
Serious User
LarryLaffer  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,205
Greece
Hey Epsilon,

Quote:

Larry , I'd suggest you have a look at microcontrollers & programming of those. You could easely build a robot from scratch wich would be fully programmable and actualy pretty easely programmed.




I could easily build a robot?
I have a microcontroller programmer and several MUCs (if you want your own microcontrollers for free, visit www.atmel.com, tell them you're a big company that needs 5-6 sample chips before you make your big order, and there you go. They even pay for shipping expenses). However, lego NXT provides with motors, sensors, more powerfull microcontroller, on board lcd screen, bluetooth, plus you can program in c++ instead of assembly. But i guess it's possible to make a robot from scratch.. but i wouldn't suggest it


Quote:


Genetic Algorithyms are presented to the world in the opposite direction , as a 'problem solving' method , wich is wrong for the concept. It should be the 'brain' that solves a problem , the GA should only pick the ones that sovle the problem better and mix them to make them even better.





Genetic algorithms are a 'problem solving' method..

Take chess for example. Every time it's my turn, the problem is: 'What move should i make, so i'm closer to capturing the enemy's king, without having mine captured first'. The 'brain' won't solve this, it only needs to provide a way to evaluate GA's candidate solutions. GA is a search algorithm. The search space in chess is all legal moves that a player can take. GA will pick the best move(not guaranteed though), by partially investigating the search space. (of course, all legal moves in a player's turn is not a big search space, but it becomes big when the player also needs to look ahead a few moves).


Quote:


As for Finite State Machines , you all say they're simple Are they ? I think the answer of learning is in there. A Finite State Machine is some simple If Else statements , but what if you actualy change the 'situation' under wich If operates. If you instead of 'state' use a value , wich you could change ? If you combine this with a concept of Neural Networks , to arrange the diffrent 'neurons'(If-Else in this example) in such a way to actualy make an AI evaluate a situation and produce a response ? IMHO , combined with GA's to select the 'best' evaluating & performing AI's it'll produce a very powerful AI wich actualy doesnt consist of neighter a defined GA , Neural Net or Finite State Machine (It only uses the concept of those). Dont you agree ?





Your solution consists of both a GA, a Neural Net and an FSM. It's a finite state machine which depends on an NN for its transitional logic, which in turn depends on a GA for training its weights. Your model will indeed learn since it uses a GA, but its still limited by the finite state machine, which is used by game programmers to simplify human's behavior. IRL, you never find yourself in 'attack' state, or 'idle' state and suddenly change from one to another. It's all a mixture of inputs and feelings and desires that are computed in your brain's Neural Network and let you decide what to do next. As far as i'm concerned, FSMs don't belong in Strong AI, and they're even obsolete for weak AI. In my implementation(IntenseAi, a weak AI approach), I only use them to switch between physical states like Normal, Pain, Death, and not between states of mind.


INTENSE AI: Use the Best AI around for your games!
Join our Forums now! | Get Intense Pathfinding 3 Free!
Re: Genetic Algorithms and Games [Re: LarryLaffer] #115159
12/05/07 17:32
12/05/07 17:32
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
Quote:


Genetic algorithms are a 'problem solving' method..

Take chess for example. Every time it's my turn, the problem is: 'What move should i make, so i'm closer to capturing the enemy's king, without having mine captured first'. The 'brain' won't solve this, it only needs to provide a way to evaluate GA's candidate solutions. GA is a search algorithm. The search space in chess is all legal moves that a player can take. GA will pick the best move(not guaranteed though), by partially investigating the search space. (of course, all legal moves in a player's turn is not a big search space, but it becomes big when the player also needs to look ahead a few moves).
...
Your solution consists of both a GA, a Neural Net and an FSM. It's a finite state machine which depends on an NN for its transitional logic, which in turn depends on a GA for training its weights. Your model will indeed learn since it uses a GA, but its still limited by the finite state machine, which is used by game programmers to simplify human's behavior. IRL, you never find yourself in 'attack' state, or 'idle' state and suddenly change from one to another. It's all a mixture of inputs and feelings and desires that are computed in your brain's Neural Network and let you decide what to do next. As far as i'm concerned, FSMs don't belong in Strong AI, and they're even obsolete for weak AI. In my implementation(IntenseAi, a weak AI approach), I only use them to switch between physical states like Normal, Pain, Death, and not between states of mind.




This wasnt exactly what I ment GA's are problem solving algorithyms , I was reffering to Natural Selection in Nature itself. (Because GA's tend to 'simulate' exactly that.) Natural Selection isnt an algorithym and it doesnt 'pick' the creatures that are best because they might still die in stupid situations...So , I ment the 'concept' of genetic algorithyms combined with the concept of a neural network...
As for the AI , yes FSMs are a set of rules , but my point is , what if you can change dinamicaly those rules ? Here comes the NN concept...Every If Else has a value wich is like the treshold of a neuron , firing or not. Actualy , every neuron is like an IF Else statement of a FSM but with 'changeable' values for weights. (Each neuron is 'hardcoded' with a purpose!)
You say FSMs are a way for programmers to simplify human behavior and are limited(and limiting the rest of the concept). Think about the basic feelings that control every creature in our world...eg. Fear , Anger , Hunger...IMHO its OK to implement those strict rules that never change...a wolf will always hunt for pray because it'll eventualy get hungry and angry. But the most powerful is Fear. I cant think of an example , to describe what an animal would do but its the most 'hardcoded' into every creature. So , I guess you could hardcode those in a FSM wich will limit the AI to mimicing the basics of the brain.
I dont think you can disagree on this one because the essence of making a real AI that lears like a real creature is mimicing real life , nature.
I'm right now trying to figure out how to even 'design' such an AI and I'm getting closer to the answer with every tought (It might be far , maby too far , but eventualy , by Murphy's laws , I'll get there )

PS.: Dunno about lego NXT or other robots , but I finished scool for low-frequency electronics and I can tell you that its not very difficult to build something electronical , if you know what you're doing. I personally wasnt very dedicated to school but I have friends (from my class) wich for two hours can make whatever you like
Actualy , I had ... I dont have any friends right now , but thats entirely my fault


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Re: Genetic Algorithms and Games [Re: EpsiloN] #115160
12/05/07 20:00
12/05/07 20:00
Joined: Jul 2004
Posts: 1,205
Greece
LarryLaffer Offline OP
Serious User
LarryLaffer  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,205
Greece
Quote:

Natural Selection isnt an algorithym and it doesnt 'pick' the creatures that are best




Sure it is. Natural Selection works exactly like a GA does(or i guess the other way around). The search space this time is every possible organism that may live in our planet, from a simple virus, a plant, tree, bird, fish, a human, to T-rex, big foot, king kong and godzilla . The evaluation function filters out organisms that are unable to pass their DNA throughout the years. Any organism living here today has been deemed resistant enough to their current environment, be it a cockroach or lemmings(lemmings may be suicidal, but they reproduce like crazy so they still managed to survive, and that's what counts).



Quote:

You say FSMs are a way for programmers to simplify human behavior and are limited(and limiting the rest of the concept). Think about the basic feelings that control every creature in our world...eg. Fear , Anger , Hunger...IMHO its OK to implement those strict rules that never change...a wolf will always hunt for pray because it'll eventualy get hungry and angry. But the most powerful is Fear. I cant think of an example , to describe what an animal would do but its the most 'hardcoded' into every creature. So , I guess you could hardcode those in a FSM wich will limit the AI to mimicing the basics of the brain.




Your AI will work fine, and i don't disagree with you, but you'll lose all the innovative characteristics that ANNs have to offer when you use them this way. A GA+ANN can evolve it's own Hungry feeling and send creatures to eat, because the ones who don't will die, without you hardcoding it in. If you still want Fear,Anger,Hunger values to control your AI, you can use them as inputs in an ANN and the output could be the name of the action they need to follow, again making FSMs redundant.


Quote:

PS.: Dunno about lego NXT or other robots , but I finished scool for low-frequency electronics and I can tell you that its not very difficult to build something electronical , if you know what you're doing.




I'm sure there's a certain thrill building a robot on your own, but even if I could use a soldering iron, i don't think i could match the quality of existing commercial products.. I mean, you could build a motor, but you could never build a servo high precision motor, like the NXT have.


INTENSE AI: Use the Best AI around for your games!
Join our Forums now! | Get Intense Pathfinding 3 Free!
Re: Genetic Algorithms and Games [Re: LarryLaffer] #115161
12/05/07 20:43
12/05/07 20:43
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
Quote:

Any organism living here today has been deemed resistant enough to their current environment



Ok , thats true , but you're talking globaly. If we take as an example only a group of (all the same) creatures , than the best one of them might for example fall , break its leg and die in the process While , not the best (for example in food gathering and fighting) might sucessfuly pass thru that same spot where the best broke its leg. So , the best isnt reproducing , but the others are. While GA's always pick the 'fittest' , without accounting for this random factor that the best might 'die' or something else happens to his reproductional organ for example...
As for the NNs , you may be right , but after I carefully studied what exactly the backprop did , and what exactly is a 'self organising network' I started to get dissapointed in the implementation of the concept of NNs. They narrowed it to a simple function that decreased or increased a value over time. (Like accelerate() for example ) Wich is limiting , IMHO , because it isnt really learning , but only 'changing' an input into something what you've told it to change it into. (And it changes its values , wich is something like shortcut for a programmer , until it meets your requirements. Self-organising maps on the other hand are unpredictable as you dont know what the output will be , and you cant use it (for example) as strictly one type of audio encoding/decoding(again,for example)).
Are you working on something related to all that? Maby a new AI ? I'd like to hear of some implementations into C-Script , because there arent many examples to 'learn' from.


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201
Page 3 of 5 1 2 3 4 5

Moderated by  checkbutton, mk_1 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1