Re: [Audyssey] AI in games

2014-03-25 Thread valiant8086

Hi.
My project is using some AI. What mine does is rolls a 1d100, then it 
has for each type of opponent sections of that 1 to 100 that tells it to 
do certain things. like, if it's less than 15 scan, if it's between 15 
and 30 fire this, greater than 30 less than 80 approach, etc etc. The AI 
has around 200 chances per try to come up with something that it can do, 
but there is no extra delay for each time it tries, because that's the 
other part of the trick. When it comes up with something to try, it, 
just tries it, it doesn't actually do it. It calls a function that 
decides whether it will do it or not. If it has no capability to do 
that, then it obviously won't, but if it does have the capability, there 
is room to implement the capability to have a chance that it will do it, 
and you can set up some numbers to control the chances based on the 
likelihood that function is going to actually be useful to the AI, 
whether the AI for that particular type of opponent is good enough to be 
smart enough to do that, etc etc. For instance this is where it decides 
that won't fire the laser, as in a previous example by someone else, if 
you're too far away. Basically, the try things either do something and 
take away the try, or it does nothing at all and the function that is 
trying to decide what to do will still have that try left , and 199 
chances now and it goes and rolls 1d100 again and tries the function 
that it came up with again based on the rules I first provided. So you 
can adjust likelihood to pick things to do in this way, and then you can 
adjust likelihood further for each individual decision on specific 
basis, and since it doesn't take away the try, just subtracts a chance, 
it doesn't mean the computer wasted time if it doesn't decide it will do 
what ever it was asked to do. This turned out to be pretty simple code 
to understand and mess around with, as it separated all the logic for 
each individual possibility and provided a ridiculously simple way to 
adjust likelihood that it would pick certain things. And I can add new 
AI's for new opponents by copying and pasting from one of the others and 
changing numbers around and maybe adding or removing a line or two if I 
need to add a special choice for this particular AI or remove one, and 
the number changing allows to make it more likely this this opponent 
will be scared a lot and want to run away for instance, or that it will 
usually just stand there and slug it out, as it were. Continuing with 
the slugging it out, if the AI has decided to try to slug it out, the 
code would then see if it can slug it out after all, does it have what 
it needs to do so. If it can't slug it out, then it doesn't do anything, 
the function just runs out without actually doing anything, and the try 
function will continue on it's loop. make the try function's loop count 
downward so the computer can give up if you totally screw it over and it 
literally can't do anything. I suggest 5ms delay for the loop so the 
computer will make up it's mind quickly. If you need the computer to 
pretend like it's thinking, make the actual decision when it comes up 
with something that it is actually going to do, then introduce how ever 
much lag you want as it does what it's going to do. In my case, when the 
computer does something, it completely eliminates the try function 
regardless of chances left, and if the computer gets to go again, then 
the try function is called up again and started with 200 chances again.


Also consider this. In the functions that the try function is calling, 
you can have them actually call other functions that the try function is 
supposed to call and then return themselves back to the try function as 
if they did nothing. If the function it called agrees to go through, it 
will do it's job and remove the try and shut down the loop, then the 
code would return back to the function that called it, who would in turn 
return it back to the loop which is not running anymore because the one 
function just shut it down. If that function actually didn't do anything 
either, it would subtract a chance, return back to the function the try 
function originally called, who would either try another function of 
it's own or just return back to the try function after subtracting 
another chance. It sounds confusing but I'm trying to do this without 
giving away too much.


I ended up having to make the AI kind of stupid in my game and just try 
random things, otherwise the player wouldn't have a chance at all to win 
the game. It does it to a certain limit though, it knows not to do stuff 
that absolutely would make no sense, firing weapons while out of range, 
for instance.


In summery, using this approach it is a piece of cake if you figure out 
that your AI is doing a certain thing too much to tweak how often it's 
going to do that, just change a couple of numbers around, that would not 
affect whether it decides it can do that, just how 

Re: [Audyssey] AI in games

2014-03-25 Thread john
This gives me quite a bit to look through. I'll have to do some more in depth study before I figure out how I actually want to build the code. As it stands, I'm trying to figure out what type of ai I want to build; random or strategic, or if I want 
to try for a mix. When I get to the code though, your info should help a lot.


---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.


Re: [Audyssey] AI in games

2014-03-23 Thread Charles Rivard
I like to try beating Shredder Chess on my iPhone.  It will, if you choose, 
adjust it's playing strength based on your skill.  If you lose, it won't 
play as well during the next game.  If you win, it won't be as easily beaten 
next time.  I don't know how chess programs figure out their next moves, but 
it's fun to play against them, and they do use some form of artificial 
intelligence.


---
Be positive!  When it comes to being defeated, if you think you're finished, 
you! really! are! finished!
- Original Message - 
From: Zachary Kline zkl...@speedpost.net

To: Gamers Discussion list gamers@audyssey.org
Sent: Saturday, March 22, 2014 6:40 PM
Subject: Re: [Audyssey] AI in games


John,

I’m not a developer, but I think I can chime in here from a player’s 
perspective. AI is something I’d appreciate in many games, though it’s 
almost a necessity in certain genres, such as strategy titles. I need the 
illusion of a worthy opponent to keep my interest up.
That being said, AI is hard, even for professional developers. I think the 
moment you try and build sophisticated decision making or the like into a 
game, you add a lot to your development time.
Not all games need very much  AI. Simple games can probably get away with 
random numbers, as can, obviously, purely online efforts. But anything 
single player probably requires at least a stab at it.

Hope this helps a bit,
Zack.
On Mar 22, 2014, at 4:32 PM, john jpcarnemo...@comcast.net wrote:

This is a rather loaded question, so I apologize in advance to all the 
programmers who are probably going to get headaches trying to explain this 
to me. I'm looking to get some information on the pros and cons of various 
AI types in games. Is it worth designing a real ai? Under what 
circumstances does the type of ai used in entombed (all random) work, and 
in which does it not? Below, I'll explain what I have for information 
already:
I understand that there are several different ways of building enemy 
intelligence into games. Specifically, there's the type in entombed, where 
the enemies do things completely at random, and hope for the best. There's 
the type of ai in the GMA games, where the computer just starts shooting 
as soon as it can, and hopes it hits you. There's a system like the one in 
smugglers three, where the computer uses its weaponry in a very specific 
order (it always fires missile first, then lasers if it can). Finally, 
there's a system where the computer actually looks at the numbers, and 
acts based on the information it can gather, in a manner that will most 
benefit it at the time.
I'm not looking for specific advice on how to program the ai (yet), rather 
I'm asking for your personal experiences and opinions regarding ais in 
games. Can you give me examples of when you would use each type of system, 
or why you would never do so? Is there one type of system that is 
particularly difficult to manage? Is there a point where building more 
intelligence into the game begins to affect the performance and 
functionality of the game? Basically, what have you done previously, and 
what do you think the best way to handle this is?


Thanks,
John

---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to 
gamers-unsubscr...@audyssey.org.

You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the 
list,

please send E-mail to gamers-ow...@audyssey.org.



---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to 
gamers-unsubscr...@audyssey.org.

You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org. 



---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.


[Audyssey] AI in games

2014-03-22 Thread john
	This is a rather loaded question, so I apologize in advance to all the programmers who are probably going to get headaches trying to explain this to me. I'm looking to get some information on the pros and cons of various AI types in games. Is it 
worth designing a real ai? Under what circumstances does the type of ai used in entombed (all random) work, and in which does it not? Below, I'll explain what I have for information already:
	I understand that there are several different ways of building enemy intelligence into games. Specifically, there's the type in entombed, where the enemies do things completely at random, and hope for the best. There's the type of ai in the GMA 
games, where the computer just starts shooting as soon as it can, and hopes it hits you. There's a system like the one in smugglers three, where the computer uses its weaponry in a very specific order (it always fires missile first, then lasers if it 
can). Finally, there's a system where the computer actually looks at the numbers, and acts based on the information it can gather, in a manner that will most benefit it at the time.
	I'm not looking for specific advice on how to program the ai (yet), rather I'm asking for your personal experiences and opinions regarding ais in games. Can you give me examples of when you would use each type of system, or why you would never 
do so? Is there one type of system that is particularly difficult to manage? Is there a point where building more intelligence into the game begins to affect the performance and functionality of the game? Basically, what have you done previously, and 
what do you think the best way to handle this is?


Thanks,
John

---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.


Re: [Audyssey] AI in games

2014-03-22 Thread Zachary Kline
John,

I’m not a developer, but I think I can chime in here from a player’s 
perspective. AI is something I’d appreciate in many games, though it’s almost a 
necessity in certain genres, such as strategy titles. I need the illusion of a 
worthy opponent to keep my interest up.
That being said, AI is hard, even for professional developers. I think the 
moment you try and build sophisticated decision making or the like into a game, 
you add a lot to your development time.
Not all games need very much  AI. Simple games can probably get away with 
random numbers, as can, obviously, purely online efforts. But anything single 
player probably requires at least a stab at it.
Hope this helps a bit,
Zack.
On Mar 22, 2014, at 4:32 PM, john jpcarnemo...@comcast.net wrote:

   This is a rather loaded question, so I apologize in advance to all the 
 programmers who are probably going to get headaches trying to explain this to 
 me. I'm looking to get some information on the pros and cons of various AI 
 types in games. Is it worth designing a real ai? Under what circumstances 
 does the type of ai used in entombed (all random) work, and in which does it 
 not? Below, I'll explain what I have for information already:
   I understand that there are several different ways of building enemy 
 intelligence into games. Specifically, there's the type in entombed, where 
 the enemies do things completely at random, and hope for the best. There's 
 the type of ai in the GMA games, where the computer just starts shooting as 
 soon as it can, and hopes it hits you. There's a system like the one in 
 smugglers three, where the computer uses its weaponry in a very specific 
 order (it always fires missile first, then lasers if it can). Finally, 
 there's a system where the computer actually looks at the numbers, and acts 
 based on the information it can gather, in a manner that will most benefit it 
 at the time.
   I'm not looking for specific advice on how to program the ai (yet), 
 rather I'm asking for your personal experiences and opinions regarding ais in 
 games. Can you give me examples of when you would use each type of system, or 
 why you would never do so? Is there one type of system that is particularly 
 difficult to manage? Is there a point where building more intelligence into 
 the game begins to affect the performance and functionality of the game? 
 Basically, what have you done previously, and what do you think the best way 
 to handle this is?
 
 Thanks,
 John
 
 ---
 Gamers mailing list __ Gamers@audyssey.org
 If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
 You can make changes or update your subscription via the web, at
 http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
 All messages are archived and can be searched and read at
 http://www.mail-archive.com/gamers@audyssey.org.
 If you have any questions or concerns regarding the management of the list,
 please send E-mail to gamers-ow...@audyssey.org.


---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.