Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in General Gaming: supernova05 | 4 guests
Acmlm's Board - I2 Archive - General Gaming - Game Theory: Testing to prevent "unsolvable" puzzles in games | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Wopple

Red Goomba
Level: 8

Posts: 40/41
EXP: 2026
For next: 161

Since: 09-03-05

Since last post: 8 days
Last activity: 8 days
Posted on 10-21-05 08:18 AM Link | Quote
A looooooooooooooooooooooooooooooooooooong time ago someone, I believe Rydain, posted a thread asking if anyone knew how to code something that would check and see if a game would ever stop the player dead, for example, the key for a door is behind it, etc.

The answer, which I don't think was given then, is a resounding NO and it can be proven. I wanted to start this thread partialy as a mental playground and aldo to keep other from trying.

I will post and proof and discuss it later, once more people have responded with a "duh" or "Wait, you can't" or "Who gives a shit!?"


(edited by Tamarin Calanis on 10-21-05 02:34 AM)
Colleen
Administrator
Level: 136

Posts: 11079/11302
EXP: 29369328
For next: 727587

Since: 03-15-04
From: LaSalle, Quebec, Canada

Since last post: 3 hours
Last activity: 1 hour
Posted on 10-21-05 08:37 AM Link | Quote
I think it could PROBABLY be done but you'd be looking at a complex piece of coding. The key thing might be able to be done of, for example, the game checked to see where the player's starting position was and compared it to the key's location.

It would all depend on the game and its complexity though. I have a feeling some less complex games could have such an algorithm, but more complex ones... no.
Tamarin Calanis

We exist. Earth exists. The universe exists. Do we really need to know why?
Level: 59

Posts: 1753/1802
EXP: 1672751
For next: 377

Since: 07-12-04
From: The gas station on the corner...

Since last post: 5 hours
Last activity: 5 hours
Posted on 10-21-05 11:37 AM Link | Quote
Alright, Wopple, I dunno what the hell is wrong with your layout. I tried something that seemed like it'd fix it, but it didn't appear to do anything.

It appears that you've closed too many tables, but I'm not sure.

Anyway, that was just explaining my edit, so you eren't confused.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 7926/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 10-22-05 01:54 AM Link | Quote
For a simple game (particularly a puzzle game since they're all logic), it's probably possible to write an AI system that would basically play the game itself and report anything it can't figure out.
Squash Monster

New Age Retro Hippie
Togateiru Fohku Kohgeki!!
GRUNGE no HAMSTER otona bite
Peace love and turnpike!

Level: 40

Posts: 671/677
EXP: 430507
For next: 10802

Since: 03-15-04
From: Maryland (of the Country Between Canada and Mexico)

Since last post: 5 hours
Last activity: 5 hours
Posted on 10-22-05 05:44 AM Link | Quote
I ran into this problem when planning out how to make a level generator for a Metroid-like game. I'm pretty sure my solution works, so I'll walk through that. Note that my solution might be considered cheating by some, as it generates games without any possibility of having a "key behind its door" problem instead of detecting that problem in already generated games.

It would be a headache beyond all imagination and a complete computer-eater to generate a chunk of level and then have some form of AI walk through and try to figure out how to get through everything. The first rule of level generators is to never try to do anything delicate once you're getting to the phase where you actually start laying down tiles.

In this case, it's going to be best to make generating the order and rough location of all the items the very first thing you do.

To do this, we'll use a tree structure. For those unfamiliar with the term, a tree is a set of linked nodes meeting the condition that there's exactly one path of links between any two nodes.

For this specific problem, we're going to make it so there are three special types of nodes. One node will be the starting location node. Some nodes will be item nodes -- these are each associated with one item (a key item node is a place you can get a key). And some nodes will be obstacle nodes -- these are each associated with one item as well (a key obstacle node is a door).

1.) Start with one node, this is the player starting location.
2.) Repeat the following steps 3 and 4 until you're sick of it.
3.) Add an item node with a link to a random existing node.
4.) Add an obstacle node coorisponding to that item with a link to a random existing node.

Now, there are a few more steps you'll want to do before getting out of tree mode if you want the game to be reasonably interesting. If you don't want to, just skip to step 8.

(Add an additional list of items to the obstacle node definition. The original item is going to be the required obstacle. The other items are all optional obstacles. When finishing up the generation, the generator can randomly decide whether or not to put these in.)

5.) Repeat 6 and 7 until no changes are made or you're sick of it.
6.) Trace from each item node back to the starting node. Make a list of all the obstacles in the way (including optional obstacles).
7.) Go through the entire map and add all the obstacles you just listed to the obstacle list of any obstacle that already lists the item you started with in 1.

8.) Generate the game using that tree as a pattern.

Also note that before you generate, you can safely link any random pair of obstacle nodes. Mind you, this makes the structure no longer a tree, so if you're going to want tree properties later on, don't do this. Also note that you probably want to do this after figuring out where all the nodes are going to be in 2D space, so you don't have any links that overlap anything.


(edited by Squash Monster on 10-21-05 08:45 PM)
Rydain

Ropa
Blaze Phoenix
Runs With the Dragon Within

Level: 42

Posts: 729/738
EXP: 490056
For next: 31306

Since: 03-15-04
From: State College, PA

Since last post: 6 days
Last activity: 8 hours
Posted on 10-23-05 03:01 AM Link | Quote
Yes, it was me...and although I haven't worked on my text adventure engine in four years, I would love to see your proof because the subject still fascinates me. What context of puzzles are you referring to - a specific genre, a specific complexity, all puzzles? I can understand that a complex setup like a text adventure with many required tasks would be difficult to prove solvable (assuming it was even possible to begin with), but what about simpler cases?

Dark Cloud and its sequel (PS2) are games with randomly laid out dungeon levels that are always solvable. They'll frequently contain a locked door and a key in a treasure chest somewhere, but you will certainly find the key on your side of the door. I don't know the exact mechanism used to create the layouts, and I've never tried to find out. For all I know, it could randomly select from some sort of limited set of possibilities, and all of them could be set up in such a way that a key chest would not fall on the wrong side of the door to begin with. However, because there is only one simple puzzle involved, I'd think that a truly randomly generated Dark Cloud level could be checked for solvability. Knowing the coordinates of the key chest and the starting position of the player, try to draw a line between the player and the chest. I don't know much about path finding algorithms and what I do know is rusty, but considering that games can move enemies toward you along traversable surfaces, why would this not be possible?
Wopple

Red Goomba
Level: 8

Posts: 41/41
EXP: 2026
For next: 161

Since: 09-03-05

Since last post: 8 days
Last activity: 8 days
Posted on 10-25-05 04:02 AM Link | Quote
It is actualy referring to any "code" in general, and the analysis of that code. Of course, within the context of a certain simple games like tic tac tow or tetris or somethign like that, you could make an algorithm for chcking for certain things in a design or pre design, but the proof is more that you cannot write code that will check for infinite loops within other code (which would basically be a game with such a problem.


My Layout: odd. I do remember, awhile ago, I tried to change it ended up losing it somewhere between previews and edits. So I then checked and my layout worked fine. But if it was messing stuff up, then I guess it was *shrug*

Proof comming soon, about to leave work now...
Rydain

Ropa
Blaze Phoenix
Runs With the Dragon Within

Level: 42

Posts: 735/738
EXP: 490056
For next: 31306

Since: 03-15-04
From: State College, PA

Since last post: 6 days
Last activity: 8 hours
Posted on 10-25-05 04:33 AM Link | Quote
Take your time. I'm looking forward to seeing what you have put together.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - General Gaming - Game Theory: Testing to prevent "unsolvable" puzzles in games | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.010 seconds.