Advertisement

Target seeking without information

Started by March 28, 2016 01:03 PM
8 comments, last by cloa513 8 years, 7 months ago

The point of my game is that you are a warrior walking up the enemy in an arena. You first set your perception number and deception number and what stat for the enemy that you want which is a trade off against attack power 1 for 1 at least at the start. Then it checks these compares the perception to deception and show the enemy's stat (at the moment) that you asked for. The stats are attack power, attack speed,attack accuracy, defence power, defence speed, defence accuracy and possibly later starting numbers/characteristics of weapons, shields, armour and character type. The first enemy will just have fixed and quite low numbers for all.

The attack speed needs to be faster than the enemy's defence speed to hit and accuracy greater than defence accuracy to not be reduced by defence power. Any thoughts on how you design the enemy AI to do similar to the player? - stats level choice and "tactical decisions"- try hard to perceive and/or deceive and either attack & defend or actively defend with a big dodge so enemy looses his next attack or use a shield and possibly attack.

Any general thoughts on principle to follow with the AI design.

The main thing with any enemy artificial intelligence system is first considering the way the enemy will actually MOVE about on the screen. For example, if you are making a turn-based game, where the player has time to chose an attack, or free form, where the enemies move about on their own and attack whenever they dicide to.

If it is a turn-based system, the solution is very simple and straight forward. You simply need to start smaller. For example, get a basic enemy that cannot even attack, or be attacked, just to get started. Then you can make the player attack one simple move without stats, etc. The point is that you should always start with the simplest possible and slowly add increments as you go along, instead of trying to cram 50 stats and attacks into your brain while also trying to do graphics, movement, etc.

SIMCUBE™ A video game I am making for no particular reason except that it is awesome!

Advertisement
Assuming your combat system is not asymmetrical - that is, the player and AI play by the same rules - the best solution is to write down extensive, detailed notes about how you would play the game. How do you decide if you want to try for a deception versus a vanilla attack/defend? How do you decide if an enemy is too powerful to bother with? Etc.

As you go you will discover that the rules become almost code-like, and you can implement them either directly or using a larger architecture.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

ApochPiQ is right on target. just make it do what you would do, to the best of your ability. That's the way to write good AI. assuming you are good at the game.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

The main thing with any enemy artificial intelligence system is first considering the way the enemy will actually MOVE about on the screen. For example, if you are making a turn-based game, where the player has time to chose an attack, or free form, where the enemies move about on their own and attack whenever they dicide to.

If it is a turn-based system, the solution is very simple and straight forward. You simply need to start smaller. For example, get a basic enemy that cannot even attack, or be attacked, just to get started. Then you can make the player attack one simple move without stats, etc. The point is that you should always start with the simplest possible and slowly add increments as you go along, instead of trying to cram 50 stats and attacks into your brain while also trying to do graphics, movement, etc.

Not intending to have much movement around the screen. The player will move directly towards the enemy only to possible have a range stat but enemy won't otherwise its symmetrical. Not much graphics intended either. Its simultaneous resolution. Thanks for your reply. They can't attack without stats- its the core of the game. What if I can't decide how I'd play the game to win. It could almost random decisions by enemy putting all his eggs into one basket for each turn. Player guesses right or gets some information and it is totally counterred.

If you don't know how to make a move in a particular situation, there are two possibilities:

1. The game situation is ambiguous and no move is superior, so pick one. Be random if you must but prefer sticking to patterns or "character types" that can be easily recognized and anticipated by the player.

2. You don't know your game design well enough. This is much harder and ultimately can make or break your design if it's something of your own creation.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Advertisement

I thinking more the enemies have a personality rather play to win. Any thoughts on that.

Same procedures apply, just with different objectives. How would you express a particular personality if you were in the place of the AI?

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Before thinking about AI opponent "personality" I would research optimal strategy; if "personality" affects behaviour, it makes opponent do something more stupid than following the optimal strategy, and you need a very good grasp of the level and consequences of such stupidity.

Assuming, from the description, that the optimal strategy is randomized (picking different attack or escape moves with specific probabilities that depend on game state, known information etc.) enemy personality can take the form of a slight alteration of the probabilities (e.g a stubborn opponent is slightly more likely to repeat whatever he did on the previous turn, a brutal opponent makes more powerful attacks and less quick/light ones). After computing the optimal strategy, you should be able to compute how much such alterations affect expected combat results quite easily.

Omae Wa Mou Shindeiru

Thanks for all your replies. Now to clarify to the tactical winning combinations:

If you think your opponent is going to defend then you want to attack and be faster or as fast as him. You rarely choose high accuracy unless his armour is very good but he has a disadvantage in speed.

If you think your opponent is going to actively defend then either want to attack with equal or greater speed and equal or greater accuracy or you can just defend since the crowd will cause him to lose 2 health- shoot him in the both for looking like a fool. If you miss when your opponent is actively defending then you lose the next turn as you are

If you defend twice in a row then you lose 1 health- crowd hurts you for stalling- not a good tactic for player as he has slightly less heath than his opponent.

This topic is closed to new replies.

Advertisement