Jump to content


janborg

Member Since 01 Feb 2011
Offline Last Active Jul 26 2011 07:06 AM

Posts I've Made

In Topic: 3D Bullet Fall

18 July 2011 - 05:51 PM

z+=ztt is executed every step. Could it be that it should only happen once?

In Topic: Evolving AI

24 April 2011 - 05:12 PM

Everything described in this topic so far is already defined as advanced or modern AI.
Evolutionary Algorithms (EA):
In IceMetalPunks boss example, an EA approach would involve an entire population of bosses. Each boss has his own set of randomized numbers triggering different behaviors (like DNA). Each of these bosses would play against the player character (this is done easiest if the player is automated) one or more times each in order to figure out their fitness. Some would be randomized to be utterly stupid while others might have some potential. This is where the evolution part comes in: The most fit ones are chosen (e.g the top 10%) and the rest are deleted. These fitter survivors will now be the basis for a new population, as the 'DNA' of each is combined and possibly mutated a little to create new offspring until the population is up in numbers again. Then the entire process is repeated, e.g. 100 times (or generations) until you decide to stop evolving it.

The other approach I see described here is what is called reinforcement learning (RL) :
In an RL approach, you only have a single agent, not an entire population like in EA. This single agent is (like in behaviorist science of salivating dogs) reinforced positively or negatively (rewarded or punished) for its actions. Let say the goal is to hit the player, if the boss of IMPs example is in one state and tries one approach to hit the player but misses, his behavior is punished and numbers concerning this state are altered. If he later is in the same state and tries something else and is successful, he is rewarded.
So there you go, basic intro to modern AI. Note: My explanations are somewhat simplified...

BTW: RL is the technology behind the best BackGammon AI in the world.
PS: This description is not to discourage you from talking more, just to theorize it a little more :D

In Topic: memory card game

18 March 2011 - 06:45 PM

I would:
Make a card object that can have various sprites (images) and have a single sprite for back side of the images.
make a controller object and place it in a room
In controller: Make a 2d array or grid and fill it with card objects
Then loop through the array/grid and position the card objects increasingly further to the right. Every time 6 has been placed, then let the next 6 be placed on a new line below the previous ones.
And of course make some clicking possible on the cards, by having a left pressed event on the card object

In Topic: Calculate lengthdir's

11 March 2011 - 09:01 AM

how about drawing the arm directly on the player sprite? Or having two different sprites and swap between them, one for when holding knife, one for when something else

In Topic: the "choose" statement

10 March 2011 - 09:32 PM

yeah choose (heh) irandom(x) instead:
" irandom(x) Returns a random integer number between 0 and x (inclusive when x is an integer). "