1. AI
- Posted by Noah Smith <nhs6080 at UNIX.TAMU.EDU> Oct 07, 1998
- 487 views
- Last edited Oct 08, 1998
Alright. So I've got my code name= "Sun Tzu" and I've got my concept, my interface, game-play and so on. What I don't have is a clue about AI. How do I get the little bugger to fight back? The game style is gonna be a slow "real-time" game. Grid-based. There's only two types of units (for simplicity). Any suggestions? Or maybe you guys can point me in some direction? thx snortboy
2. Re: AI
- Posted by Hawke <mdeland at NWINFO.NET> Oct 07, 1998
- 502 views
- Last edited Oct 08, 1998
Noah Smith wrote: >and I've got my concept, my interface, game-play and so on. >What I don't have is a clue about AI. >How do I get the little bugger to fight back? (snip) well, to develop an AI, or to help develop it, I would need to know the rules of the game, and how to play it. (and yes, those 2 _can_ actually be different things, rules vs how2play that is :) however, we can also talk in generalities about AI, if you like. things I look for when I'm looking at computer AI: is it adaptive, responsive, natural and adjustable? adaptive: can it change it's attack and defense based upon the patterns portrayed by it's foe? (can be real tough to implement, but very valuable in AI) responsive: can it sense the level of experience of it's foe? (this actually should go before the adaptive question, as this is the trigger for adaptiveness to begin, and it's not the same as 'adjustable'...) natural: does it play with cold calculating logic? (which can be beaten way too easily, usually) or does it seem to have a 'warmth' associated with it's decisions? (warmth, here, does not mean simply tagging a random number when faced with a set of choices (strengths)... there's more to it... when 2 humans play, there are certain cues each give out, like a poker face not being held fast, that reveal tidbits about the overall strategy and even the next move that the foe is using and considering... those tiny cues make up 'warmth' and the reading of those cues helps determine 'responsiveness' and 'adaptiveness') adjustable: does it have a directly settable level of difficulty(LOD) that actually behaves as if it *was* that level? (too often, simply setting the LOD means you're simply setting the depth of lookahead, and that is _not_ a true imitation of the behavior of a player for a particular LOD. amateurs often lookahead nearly as far as experts, but that doesn't define you as either one. experts generally have other qualities about their reactions/playing that make them win:sneakiness and cunning 4ex... neither are defined by lookahead) so with these qualities (at the least), you can begin to flowchart your AI responses. there are at least 2 schools of AI code, that are often implemented together. the first is "have a reaction for every action" or the classic "textbook responses" type of coding. the other involves making the machine "think" as you would about a problem. one way to do this is by creating a set of 'strengths' for each valid move you are facing on each turn. this is a very popular method as well, often used after examining your valid moves against 'textbook masters moves'. the combination of holding a set number of 'masters moves' to try/apply first, and falling back on 'thinking' usually provides AI that fits the above 4 definitions well. we'll stop here for now, letting you reply, and perhaps in that reply you may wanna include the way the game is played so that discussion of AI techniques for that particular game can become specific... :) --Hawke'
3. AI
- Posted by Lewis Townsend <keroltarr at HOTMAIL.COM> Oct 08, 1998
- 484 views
Hello Someone asked about AI (I deleted the mails accidentally) and someone else gave a long complicated explanation. So, here's my shot at it: I haven't done much with ai but here is what I know: Your game is the strategy game thingy like C&C, right? 1. Decide who is making the decisions A. The AI comander would make descisions about where to deploy units and what units and buildings to build. B. The unit itself would decide whether to attack another unit in transit and how to get to a destination 2. Gather info A. The comander would know about terrain and positions of enemy units that all of its units could see B. The unit would know only about what it could see and any destination that the commander has given it 3. Identify options A. The commander's options would be like a list of commands 1. give unit destination 2. build unit at specific building 3. build building at specific destination 4. tell unit to wander (good idea?) B. The units options would be 1. move a. up b. down c. left d. right 2. attack (list of possible locations in range) 4. Choose action A. Commander examples of pseudo code 1. alert_pos = find (enemy, radar) if alert_pos then give_unit_dest (alert_pos, pick_close_unit (alert_pos)) end if 2. if curent_cash > possible_units [tank] [cost] then build_unit (possible_units [tank], building) end if B. Unit examples of pseudo code 1. illegal_moves = {} next_step = choose_next_step (pos, dest, illegal_moves) while next_step = obstacle do illegal_moves = illegal_moves & next_step next_step = choose_next_step (pos, dest, illegal_moves) end while 2. unit [alert] = find (enemy, sight) if unit [alert] then if find (unit [alert], unit [wep_range]) enemy = unit [alert] attack (enemy, unit) end if end if hope this helps. As Hawke' (I think) said we'd have to know more about the "rules" of the game to help you more Lewis Townsend ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
4. AI
- Posted by Alan Tu <ATU5713 at COMPUSERVE.COM> Oct 09, 1998
- 509 views
Artificial intelligence, now that's good food for thought. Its difficult because we humans think in many different ways. I'm being fronted by an enemy 4:1. So, do I bolster my line or pull back= ? What units are available to get my ratio to 2:1? What is their efficienc= y, can they make it? First, I'm going to provide combat air patrols over my= force, and hit the enemy. How much CAPS? How about a fighter wing? Or two? What wings do I use? All wings are assigned to sorties, which ones= do I reassign to this little urgency. How much do I hit the enemy with? = HOW IMPORTANT IS HOLDING THAT SQUARE? My air power is elsewhere. I'm going to hold, so I sent x number of fighter wings to provide cover, and = y number of attack wings to batter the enemy force that is fronting. All right, I've decided to send a division to bolster that force because its important. Why not two, or an elite brigade? I don't know how I make th= at decision. How about supply units? Should I take the road, or should I u= se the shorter but rougher terrain? Efficiency and time are keys. See how many variables I thought of? The central question is: How important is that square? And how would the= computer know? Its just a square, not an objective square. But I would protect it because I "see" what the enemy is doing, and if I loose that square, I loose b, c, and d. Perhaps I would use weighted scores and if...thens. The bottom line I cannot map the human brain into a finite programming language. I suppose I can make an AI that meets Hawke's reqs, but AI stands for artificial. Alan =