Mortal Kombat type AI

Started by
10 comments, last by Muzlak 22 years, 8 months ago
Ok, Im trying to make a game similiar to Mortal Kombat. It is called elk hunter. The game is going to start out w/ you on the right, and then I want an elk on the left of the screen start walking towards you and randomly doing different kinds of attacks and stuff like that to you. -Muzlak
Advertisement
Don''t ask me, I don''t know. Figure it out yourself!
this is how you do it:
10111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111110010111010011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001101110010001100111110011000110011011100100011001111100110001100110111001000110011111001100011001
no .. i dont think that will work ..

the 47 ''1'' should be a ''0''
and the 145 ''1'' should be a ''0''

and the ai is a bit lame..
should add

''1111110001000100011'' for the jump kick
and dont forget
''1101010101001000011'' for air block ...



{ Stating the obvious never helped any situation !! }
You''ve got half the answer. You have to:

- Keep the guy walking to you.

- Make him do random moves at some time.

Do it as a first simple AI. Then start improving it.

The subject is worthy a lot of code... and is very complex to emulate human behaving... but that''s a simple start. The rest might be figured by yourself. Or asked later here (saying: i now have a simple AI: how do i put it better?).



--DK
--H. Hernán Moraldo
http://www.hhm.com.ar/
--DK--H. Hernán Moraldohttp://www.hhm.com.ar/Sign up to the HHM's developers' newsletter.
You might wanna check out M.U.G.E.N.
They don''t document all this very well, but the way I figure it from the files, they assign some sequences of movement to the AI who simply put them together... sometimes this create combos, most of the time it seems to work fine. I still get my ass totally kicked by Kryzalid

anyway... check it out, mayb it will give you some thoughts ?


Sancte Isidore ora pro nobis !
-----------------------------Sancte Isidore ora pro nobis !
Thanks, yeah cause I had it earlier that the elk would move to the center of the screen then just swinging his knife at you, and it looked really bad, but, after a while, the elk would push you into the side of the screen, i think i would need to have him rarely move after he gets to the center
Thanks, yeah cause I had it earlier that the elk would move to the center of the screen then just swinging his knife at you, and it looked really bad, but, after a while, the elk would push you into the side of the screen, i think i would need to have him rarely move after he gets to the center
All those 0s and 1s really screwed up this thread...

Here's an idea (probably a bad one, but an idea): Make a simple
state based AI. A state is a single combination of all possible
factors that could affect an AI decision; in your case, the
player position, the player vector, the elk position, the elk
vector, number of projectiles, all combinations of projectile
positions and vectors, elk health, human health, current elk
action, and current human action. Then "train" the AI by having
it fight another computer-controlled opponent, one that moves
entirely randomly and does entirely random attacks. Record how
many wins and losses the AI has when a certain state occurs, and
store it in a file. Run this overnight, and by the end, you'll
have a nice big file full of numbers. Then, change your code so
that the elk determines the current state, from that determines
all possible states that can be reached from the current state,
and then chooses to perform the action that will move into the
state with the best win/loss ratio associated with it in the
file. Continue to add the number of wins and losses to the file.

PROS: You don't have to think too much about how behavior
works; it's all random numbers, ratios, and file IO.

CONS: The file could become massive. This idea also requires a
good knowledge of file I/O.

Edited by - TerranFury on August 9, 2001 8:55:04 PM
quote:Original post by Muzlak
Ok, Im trying to make a game similiar to Mortal Kombat. It is called elk hunter. The game is going to start out w/ you on the right, and then I want an elk on the left of the screen start walking towards you and randomly doing different kinds of attacks and stuff like that to you.

-Muzlak


Just a guess, mind you, but I think this guy is joking.

And since I hunt both elk and deer I can say with some authority that this ain''t much
of a game...




Ferretman

ferretman@gameai.com
www.gameai.com

From the High Mountains of Colorado

Ferretman
ferretman@gameai.com
From the High Mountains of Colorado
GameAI.Com

This topic is closed to new replies.

Advertisement