a somewhat strange program

  • Thread starter Thread starter John Salerno
  • Start date Start date
J

John Salerno

Ok, this might be difficult to explain, so if it doesn't make sense, I
apologize. I'm playing a game that has a fairly complicated puzzle in
it, and I started thinking how I might make a C# program to figure it out.

There are four different panels, each of which has eight switches that
control two rows of lights, and each row has ten lights. Ultimately,
what needs to be done is flip one switch per panel so that each light in
each row is lit up from three of the four switches (two isn't enough,
and four overloads the circuit).

Alright, that might make no sense, so here's sort of a diagram that I
hope looks decent:

.. . . . . . . . . . . . . . . .
.. . . . . . . . . . . . . . . .
.. . . . . . . . . . . . . . . .
.. . . . . . . . . . . . . . . .
.. . . . . . . . . . . . . . . .
.. . . . . . . . . . . . . . . .
.. . . . . . . . . . . . . . . .
.. . . . . . . . . . . . . . . .
.. . . . . . . . . . . . . . . .
.. . . . . . . . . . . . . . . .

Each period is a light, and the eight columns are each controlled by one
switch on a panel. So this diagram would be repeated three more times
for the other panels.

Anyway, that's all just to give you an idea of what's going on. What I'm
asking for is some idea for how to get started with writing a program to
figure it out. I thought maybe I could duplicate these columsn as
textboxes on a form, and enter 1 or 0 for on or off, and then somehow
read through every possible combination to see which ones match up so
that in every spot (every light/period) there are three 1s and one 0.

Did that make any sense at all? If not, feel free to disregard! :)
 
Is this game available to anyone? If so what is its name? If I can see the
rules I can help you with an algorithm...
 
Tom said:
Is this game available to anyone? If so what is its name? If I can see the
rules I can help you with an algorithm...

Yes, it's an adventure game called Realms of Illusion (also called
Sentinel: Descendents in Time), but there really aren't any "rules",
since it is just one puzzle in the game.

I have since gotten past the puzzle with some help from a hint guide,
but I'm still interested in an algorithm to do this. I think maybe
nested for loops going through arrays might work.

(On a personal note: I can't believe how hard this puzzle was. At first,
I was hoping that my method for solving it was overly complex, but it
turns out I was right. I knew exactly how the puzzle worked and what
needed to be done to solve it, but solving it involved comparing 20
lights per switch, 8 switches per panel, and 4 panels! I can't believe a
game designer would make something like that. 4 switches per panel would
have been enough.)
 
Back
Top