Skip to Content
 

Game (Simulation) Idea "Hide and Seek"

17 replies [Last post]
zinkroid
zinkroid's picture
Offline
Joined: 01/11/2011
Basic Image

Hello All ! :)

This semester I have a project based course in which I would like to display my AI programming. I have a basic simulation/game idea where the main function is to teach the computer to be better. Here is my idea.

Concept

The game will be based around hide and go seek. The computer will control the seekers and the player will be the hider. The hider must get to home base, a tree or a flag in order to win the game. If the player is tagged, the game is over and the player loses.

Technical

There will only be one hider, the human player. After every game the information of that round will be uploaded to a server where the AI can learn. Every time a new user downloads the game and plays, the game will be using the up to date AI. The bots will be using sight (field of vision) and local communication to track down and hunt the player. Bots will attempt to work together in order to accomplish this goal. Either heuristic maps or neural nets will be used to control the bots.

Graphics

The graphics will be fairly simple. Probably a top down view of circles with triangles indicating where each one is looking. Rectangles will be used as obstruction for the player to hide behind and navigate past.

HERE IS THE PROBLEM

I feel the game will be too boring and not have enough play time for the AI bots to learn. What can I do to spice up this simple game without adding too much work? I’m thinking of creating a scoring system in which if the player will get higher points if they obtain special objects and get to “home base” in a short of amount time. Another idea would be to allow multiple players play on the same map. That could be a fair amount of work though.

Though please try to keep it simple.

So what does everyone think? Would you play the game for a few minutes?

simons
simons's picture
Offline
Joined: 12/28/2008
A few ideas

How many games would it take for the AI to learn? How good does the AI get? After I've played it for enough time, does the computer become impossible to beat?

Also, if this is to display your programming prowess, does anyone but you really need to play it?

I think the game sounds neat already. You'd be amazed how addictive really simple games are (I remember losing more of my life than I'd like to admit, watching fascinated as my old roommate played "Miner Dig Deep"). I'd probably play it for a few minutes, especially to see if the computer really figures me out. But, if you're looking for more ideas:

The first think that popped into my head was booby traps. Either set randomly (so that the player can step on them), or even better, allow the player to drop them. This creates an interesting extra bit of strategy, now, not only are you trying to avoid being seen, you're trying to predict where the enemies will go so that you can blow them up.

Possibly letting players shoot the computers, and the computers shoot back (rather than tag), might add an interesting extra dimension. Especially if one hit kills, and gunshots can be heard from a distance. Make it a James Bond theme or something. (on that note, maybe play Mission Impossible music in the background, when I designed simple Klick & Play it always amazed me how much simple stuff like that helped)

Power ups might be a neat idea. If you touch something, you become invisible for 10 seconds, or move faster, or some of the AI become frozen.

Your ideas sound good too though. Multiple players would be interesting (especially if it was a race, or a team race), although it might be hard to fit lots of people around the same computer. Multiple objectives could be neat as well.

Simon

zinkroid
zinkroid's picture
Offline
Joined: 01/11/2011
Good Ideas

Hi Simon, thanks for commenting. Its hard getting good input from forums.

I want the AI to be as intelligent as possible. I will hard code some tactics such as patrolling, standing guard, and coordination between multiple bots. Though I want their movement, where they and look to be learnt. I will also force them to spread out away from the flag (the end objective for the player).

Likely I will justify the bots fanning out to search for the player with this score system. Players will slowly gain points for remaining hidden. If they capture the flag or alternative objectives they will obtain a large amount of points. The problem is that the longer they stay in the current map, the more bots will appear in the map from some side entrances. So there will be some sort of threshold where it will become too dangerous to stay hidden in the map. If they don't get the flag, the score aquired in that level is lost along with an additional amount of points off their total score. If the score is less than or equal to zero, they lose.

I can personally play the game and teach the AI by myself. The problem is that it would be biased results. Much like the programmers for chess games, they know where the computer is focusing its computations because they implemented it. Thus the programmers would make moves in which the computer would not have time to analyze. This threw off the computers game. This was back in the 80s though when the computational power was still pretty weak.

Booby traps and items are a great addition to the game. My colleagues and other users on forums have stressed the use of them. I agree completely!! I don't want any violence or attacking in the simulation. Though it would be interesting to have an AI make a good decision of placing an alarm or sleep gas bomb.

Here are items I think the AI might have:

Binoculars - Increases the distance they can see but decreases the FOV (field of vision). The bot can not move when using this item and turning is slow.

Alarm Trip Wire - Alerts bots nearby if the player tripped it. Once tripped the item is broken. Players can detect if they are in some sort of mode and then disarm (like walking or they wait by it for a second).

Mud - Bots may place mud in order to see your tracks. Even when the player walks off the mud, the footsteps will appear beneath the user for a while. Steps do not fade away.

Here are items I think the PLAYER might have:

Gas Bomb trip wire - Either knocks out the AI unit permanetly or temporary. (I say permanent)

Rock - Player can throw item to distract AI unit.

Camoflage (Special) - Temporarily disguises the player so that the player is not recognized by AI. Can only be used once and likely has to be found in the level.

Fake Wall - Tricks the AI into thinking that a wall is in the way. If the specific AI bot has already explored the area and finds a fake wall, the bot will become suspicious and tear the wall down then alert the others. Players are able to go through these paper thin walls. If the bot sees the player passing through the wall or was on the players tail, the AI will realize the fake wall and tear it down. Mud tracks going through the wall will do the same thing.

---------------------------------------

So your right, items would add an interesting dynamic to the game. I definitely need a theme and some graphics. A James Bond/Mission Impossible sounds real good. Multiplayer sounds awesome but I'm going to hold off just yet because I'm afraid of the implementation and synchronization.

Oh yes, last bit. I will be presenting this at the end of my semester to a crowd of 150. This is suppose to be our professional practice project showing what we've learned throughout our college experience.

Please tell me what you think about the items and any other input you might have. Thank you

zinkroid
zinkroid's picture
Offline
Joined: 01/11/2011
Anyone There

Please comment. I love input !! :)

JoshuaOst
Offline
Joined: 12/29/2010
Nuns on the Run

You should look up Nuns on the Run, I've never played it but it sounds very similar to what you're trying to do.

ilta
ilta's picture
Offline
Joined: 12/05/2008
If you're looking for

If you're looking for additional board game inspiration, Scotland Yard and its remake/update, NY Chase, are great places to start. Both feature a team of detectives/policemen running around a city trying to track down a criminal.

http://boardgamegeek.com/boardgame/438/scotland-yard
http://boardgamegeek.com/boardgame/534/n-y-chase

simons
simons's picture
Offline
Joined: 12/28/2008
Hey, sorry for the slow

Hey, sorry for the slow response, school started today and I've been trying to really think about this.

Overall, I like most of your items. The only one I wouldn't super care for is the fake wall. I guess it just seems, I don't know, out of place. That said, this is just my opinion.

Could a player see the mud? If so, then why would he step in it if it could be avoided?

One item you might consider adding would be bubble-gum, tar, or something like that that would temporarily disable the player.

As to the overall structure of the game, when you described this at first, I pictured something slightly more old-timey. Like, instead of "win" or "lose," you play until you lose three lives and aim for the high score. Levels could get progressively harder, either because you programmed the AI to be harder, or because you used neural networks to allow it to out-think the player over time. I'm also not the hugest fan of getting points for hiding (although, if it is hide-and-seek, maybe that's fine), and would rather play a game where you get points for capturing minor flags/item, and then get a bunch for capturing the big one (of course, doing that brings you to the next, harder, level). If it was James Bond, it could be something like stealing secret plans and then making it to the exit or something. That said, this last bit is mostly my own personal taste, so feel free to completely disregard it.

zinkroid
zinkroid's picture
Offline
Joined: 01/11/2011
Good Comments

Hey I checked out the board games. I can't believe how close my simulation and the board games are on concept and gameplay. Nun on the run sounds like a fun game. I looked it up on a youtube video for the rules and gameplay. The novice nuns are given an objective. These nuns have to leave their room, get the objective and bring it back. I think all items are in a locked room so they also have to complete the secondary objective of getting a key. Two head nuns are given destinations to go to. If they hear a sound caused by a novice nun, they are allowed to deviate from their destination to find the novice nun (for some time at least). Novice nuns have the ability to walk or run. If they create a noise on a roll, walking will create a smaller sound radius. Thus the head nun might not hear you.

I heard Scotland yard is the opposite Nun on the run. Instead of one seeker trying to capture all the hiders, in Scottland yard, many seekers try to get one hider.

zinkroid
zinkroid's picture
Offline
Joined: 01/11/2011
Simons

Ya I think I'll remove the fake wall. How would the player know if the bot has already passed by there? Plus it seems like the player could possibly trap all the bots if the maze/level was setup in such a way.

With mud I was thinking that the AI could throw down a whole pool of mud where it would block a hallway or open area. Thus the player would have no choice but to step on it and leave footsteps or make a long detour. The mud should be visible to the player since it alerts the player that tracks are going to be left for the AI to follow. The AI doesn't leave tracks or is able to distingush between AI and players tracks.

As for the point system. I want the player to get points for side objectives and capturing the flag. Capturing the flag brings you to the next level. Here's the problem with AI logic. Why should the AI seek out the player when it can just guard the flag and side objectives? Thus the player will get caught and in due time, the player will make a suicidal attempt to capture an objective.

There's two things I can think of to justify the seekers to find the player. The player slowly gets point for the time spent in the level without getting caught. Once a timer runs out (let's say 10 min), the player wins and gets the same amount of points he/she would've gotten if the player captured all the objectives in the level. So now the AI wants to deviate away from it's flags in order to minimize the number of points obtained by the player. Though if captured, the player loses those points obtained in the level.

Now I believe the player for the majority of the time is going to hide rather then capture the objectives. I'll counter that by adding another seeker to the level every 45s-60s. My plan is that the player will realize that waiting all 10min will be tougher then waiting 3 min, maybe capturing a side objective and then going for the flag. So the player will get 3 min worth of points + side obj + flag obj.

Note the points can never go above the cummulative points of all the objectives in the level. The points obtained in a level is then added to the total campaign points which can never be deducted. Once you lose all your lives, the campaign points is submitted to an online server.

zinkroid
zinkroid's picture
Offline
Joined: 01/11/2011
Level Editor

Ok Everyone Im going to work on the level editor this weekend. I’ll be posting a URL later next week for download. None of it will do anything, its just going to be the layout. If anyone has time, I would like you to download it and do random stuff to see if you can break it. Also suggest any new windows or buttons to make the workflow easier. Please note that this level editor is specific for this game.

Lofwyr
Offline
Joined: 02/16/2010
oh yay

///So as far as programming
If you could expand on your code structure, how is it learning, are you tracking its “intelligence” with a single variable and allowing it to focus more on the player based on that?

Are you tracking its intelligence based on many variables? For instance the bot knows that the last 6 games the player has started in the lower right corner of the map. Because of this the bots disperse in that direction (ultimately ignoring the opposing corner).

Variable = “Players are in the lower right corner”
Players start in position = x/y ++ VAR
Then of course you’d contrast this VAR against the VAR for the other corners.

Now, I’m not some code guru but I know my way around a compiler and theirs method to my madness. When creating war-games (my favorite) a variety of mechanics can be used to establish new kinds of game play. A perfect example of this is “active defense”.

If a YOU are about to take damage from my attack then YOU roll defense. This forces YOU to take on a certain sense of culpability for the death of your model. I may have killed it, but that’s hardly where most players’ heads are at after botching an “active defense” roll. Most players are either disappointed in the dice; or themselves. This kind of mechanic use serves both the purpose of lessoning animosity in a competitive game as well as allowing the defending player “YOU” a certain amount of responsibility for the models death.

If you could expand on how the AI works I think the best choice for a new and interesting mechanic would be allowing the player an active role in the AI. Just like “active defense” we could use the method of the AI itself as a mechanic. Methods of tricking or misleading the AI will give the player both a sense of accomplishment (push button, get bacon) as well as an ego boost (I’m smarter than it). Actively outsmarting the machine seems like the best goal for “Hide and Seek”.

In contrast to what others have said I think the worst approach would be simple mechanics such as obstructions. Much of this of course hinges on the kind of play style you’re looking for (fast or slow).

Love to hear what direction you decide to go with this.
E

zinkroid
zinkroid's picture
Offline
Joined: 01/11/2011
E gameplay

You are absolutely right E. To make the human player have an active role in testing the AI's capability, the player must be able to attempt to trick rather then just avoid it.

So a good example of a boring simulation/game would be the user hiding behind a square because they saw a seeker coming. The seeker decides to explore around the square the user is hiding. Another seeker off the screen comes and supports the other seeker. This is an unfortunate event for the human since it was only by chance that the seekers came to explore the hiding spot. The player feels either disappointed and then likely pissed at my simulation believing it looked up its where abouts.

To avoid the inevitable, we will give the user items. We have suggested a few items already such as a rock, camoflage (temporarily invisible) and a gas trip wire. The user can use the rock to throw beyond the AI bot or distract it. Camoflage can be used in desperate situations. The trip wire can be used to deter patrols or common hallways the bots are using.

AI

Every simulation is uploaded to the server and saved. Thus I can replay every simulation that has occurred. Learning will be not be cummulative in that the computer doesn't have to reconsider previous simulations that it learned. I'm just keeping them for reference.

I haven't really considered how to implement the AI for now because I'm still researching methods. Though I do have a couple of ideas in mind. If your savy on AI, I'd love to talk about it with you but i don't want to leave others feel left out on the forum.

Lofwyr
Offline
Joined: 02/16/2010
AI R FUN

Well lets take special exception to our potential reading audience. Ive become quite fond of my fellow BGDF'rs and would love to include them in this. Also, by virtue of thier inclusion I can illustrate my next point for possible direction in your design. One tidy little mess :)

So then, I do understand your apporach to this design. You, as i percieve it, are gathering together your thoughts on how youd like the game to be played. Your creating a vision of what it looks like as its played and how you want to create interactions between player and program. May I suggest a different approach?

For the most part your spot on. A clear vision should certainly be at the forefront of any design. In this case however your method for design will directly impact your end product. AI, in this instance, will evolve with the players. Because of the kind of function your attempting to get out of your bot I would have your change your perception of the project.

Your work should begin with the design of the AI. Put simply, this "world" revolves around a central component, the AI. By first defineing the AI and what parameters create its body we gain the ruleset that defines our "world".

As an example, if the AI can hear then the player could also make sound. This allows for a variety of mechanics to be implemented based on our "world"; which is ultimately an extension of attributes of the AI. In the example above we have defined sound as an attribute the AI can handle. If the AI can handle this attribute then we can also effect the attribute. As an example, a blind bot "type" could wander aimlessly listening. The player could then use a "boom" grenade to deafen this bot but would have to be careful not to expose himself to other bots who could of course see the explosion.

By predefineing the rules of the world we are better able to generate new mechanics and simplify our design method. Once parameters are defined for the AI the mechanics of the game become a simple matter of deduction and innovation. This design method is of course my own personal preference, I use this method almoast to the exclusion of all others in my own work.

By defineing attributes that the human element can associate with will give the player a certain sense of reality and offer strong immersion in a graphically lacking simulation. Try to think of players well enough immersed to profanely exclaim thier frustrations at the little blue dot which represents thier player. Players grumbling at thier machine because they "ran" just a tiny bit too much and, as a result, were more easily tracked by a "sniffer" bot. Now the player may have to work more on thier timeing, rather than useing a burst of speed, or take an alterate path. By offering attributes in your design the human element can associate with we can gain further immersion and thus encourage interaction.

If your interested in methods of implementing this kind of AI I can suggest some rudimentary methods of action tracking etc. The most critical item you should work on first is the AI's ability to deal with bump barriers. Make sure the AI moves cleanly and deals with walls intelligently. From this basic mechainc you will have actually crteated a huge portion of the infrastructure the AI will be relying on for its other attributes.

On a side note "swarm intelligence" is incredibly fun to work with and would add an entirely new dimension to the bots ability to track a player (as well as opening a massive can of worms as far as potential game mechanics). The scale of this project being defined would certainly help me make better choices when offering my two cents about implementation of mechanics.

E

zinkroid
zinkroid's picture
Offline
Joined: 01/11/2011
Good Stuff E

Great point made E. Originally when posting this topic, I left the AI very open ended. I just said the basics of the gameplay and the sensors the bots had. Now I think its time to impose some restrictions (for the semester at least).

- Bots alert other bots in a given radius if they find the player. Otherwise there is no other communication.
- Bots use vision to find enemy.
- No items in the game.
- Levels are 2D with no elevation.
- Levels are tile based.
- Levels are not dynamic (the walls do not shift or disappear).
- There is no fog of war for bots or player (bots and player can see the whole map except that the bots do not know of the player's location).
- Only single player campaign.
- Only objective is to capture the flag.
- Player is given 3 lives in the campaign and must complete the level in certain time limit.

__LEVEL EDITOR MAPS__

Knowing that a level structure won't change during gameplay, we can export many heuristic maps when constructing the level.

Wall Push Heurstic Map

The wall mush map increases the heuristic value on the borders of walls used in the A* algorithm (path finding). This will force the bots stay more in the center of a hallways or room. This will give the bot an increased FOV (field of vision).

Dead End Heurstic Map

Not necessarily used in the A* algorithm. This map has a higher value for corners of a room or dead end hallways. This is used so that the bot won't explore silly hallways or go into a corner of a room where the player can easily slip by. This map might have less significance if the player was discovered nearby. In that case the bot will likely want to explore the corners and dead end hallways to see if the player is hiding.

Hiding Spot Heuristic Map

A map that gives lower values for potentially good hiding spots on the map. How this is constructed is during level export, a bot is placed on each tile of the map and told to look around. If the bot can see the tile on the map, +1 is added to the tile. The map is then normalized and multiplied by some constant. Thus in a big room with a box in lower left hand corner with some crouching room behind will have a very low value. Meanwhile the center of room where the tile is visible in all directions will have a high value.

Flow Heuristic Map

This map shows crowd flow through a map and shows bottlenecks through a map. This will useful to determine where common walking spots are on a map. Map is constructed during export. Please bear with me during this explanation E. Much like how we use a wind tunnel to blast particles over a car to view its aerodynamic properties over cross sectional area, I will blast particles in my level. Particles will emit from the starting point of the player. The flag will act as a black hole and suck in particles from a certain radius (making sure not to suck through a wall) and delete the particle. Particles will repel each other slightly. Friction will occur between walls and particles. I expect to see a flow of particles going from the start position to the black hole. Low heuristic values will be given on tiles that have this high flow of particles. High values will be on tiles that have stagnate particles.

__DYNAMIC MAPS__

Some maps will be updated during gameplay.

Exploration Heuristic Map

Map will show areas explored or seen. Obviously this is to give the bots some incentive to explore new areas and not to reexplore the same area. The values on the map will degrade back to 0 over time. Every bot has access to the same heuristic map.

Spotted Heuristic Map

Map will show areas where the player has been spotted. Much like the exploration map, the values will degrade over time.

Prediction Heuristic Map

Map will give low value to areas it assumes where the player is currently at. This is much like a police map where they consider the towns the criminal is currently at after a few hours after the crime (radial). If the player is spotted, the prediction map is reset to the new location the player was at.

__LEARNING MAPS__

There are some heuristic maps constructed on the server to learn about player movements throughout a level.

Common Paths Heuristic Map

Shows pathways players usually take to get to the flag. This information is uploaded to the server after every level. Low values are given to where paths players take.

__AI CONCLUSION__

Now how do I know which heuristic map provides the best results of finding the player? I don't. A neural network will adjust the importance of each map based on the results of each game. Initially the maps will all be normalized with the same constant multiplier. As the game learns, it might favor some heuristic maps over others because the seekers won on those values.

Hill Climbing shakers will be used to discover more optimal setting weights for the neural network.

(Note that there could be some heursitic maps I'm missing. If you have any suggestions for further heuristic maps or comments on the way I'm constructing my AI please PLEASE PLEASE let me know. I always like to hear feedback, positive or negative).

kos
Offline
Joined: 01/17/2011
Starting with the rules is good

Firstly, this sounds like a fun project to implement. I hope it goes well.

I agree with E that setting the rules first is the best way to approach the design.
As such, the list of rules you have listed is an excellent start. Your earlier posts presented many options which would vastly complicate the AI algorithm (using items, etc), which I doubt you would have time to implement properly in one semester.

By listing the rules, it highlights that you have at least one rule missing: namely a rule that explains why the bots should not just leave 1 bot sitting on the flag permanently. This is the best way to ensure that the bots win. As such, in order to be a believable AI (and to give the player an ego boost for "outsmarting it"), your goal for the AI should be to have it try to win using the best strategy that it can use within the ruleset. Otherwise when the player wins he thinks, "I only won because the AI was too stupid to leave a guard at the flag."
For example, add a rule that no bot may go within radius X of the flag (easily explainable via various themes, but the rule is the important part). Alternatively, add a rule that the AI does not know where the flag is (again, easily explainable via various themes).

There are several more assumptions / rules which you have probably got in your head which have not made it onto paper. Such as:
- What is the relationship between the player's movement speed and the bots? (same, faster, slower) The answer to this impacts on the player's strategy and the AI strategy.
- Do the bots have to touch the player to win, or do they just have to see him? Do they have to get within radius X of the player? Again, this affects the strategies available to both the player and the AI.

Now taking the player's perspective on what makes a "fun" game to play: waiting around is boring. As such, games where you win by waiting for the time limit to expire are generally boring. Similarly, earning points for doing nothing is boring. In this regard, your latest ruleset where the player wins by taking action and loses when the timer expires sounds like a much better game to play than the earlier suggestions.

Hope that helps,
kos

zinkroid
zinkroid's picture
Offline
Joined: 01/11/2011
Progress

Hello. Thank you for all the ideas and suggestions. Your input has influenced the way I approached developing the game. From now on, you can find the progress of the development on the FB page http://www.facebook.com/home.php#!/pages/Hide-And-Sneak/169889893057974 .

URLS for beta download locations will be posted on there. Once again, thank you all and I hope to see you on the page.

sir_schwick
Offline
Joined: 03/12/2011
Possible AI Tactic

It sounds like the number of seekers will increase as the game progresses. If a seeker reported player position in an area, then this proposed map would explain how the seekers could form a dragnet around the player. This dragnet would be proceeded by additional seekers going into the dragnet and searching you out.

The first decision for a seeker would be whether or not to directly pursue the player rather than organize the trap. For that determination you might want to research Pursuit-Evader problems. There is a good paper by Starr&Ho that details the math involved.

Actually calculating the Dragnet Map would use the result from some of the previous maps. First you would need to define a player space based on the Prediction map. Then you would need a way of detailing all the ways out from the space through adjoining tiles. You want a solution where you select a minimum number of tiles with bad(not easy to hide) bottlenecks on the Hiding Spot Map. Theoretically this map could be created at export, with each solution grid associated with particular points on the Prediction/Spotted maps.

----------------------------------------------------------------------------------------------------

I agree with the poster who suggested the seekers do not know what the player's target(the flag) is. This fits in with security guards or base guards hunting down an intruder and solves the "guard the flag" issue.

Yamahako
Offline
Joined: 12/01/2010
Does each bot have to be

Does each bot have to be exactly the same? Or could successful bots be promoted and work with other bots in the simulations? In this way some of the bots could be specialized for certain tasks.

Syndicate content


forum | by Dr. Radut