Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : General : Orb solver program
Page 1 of 3
23
New Topic New Poll Post Reply
Poster Message
larrymurk
Level: Smitemaster
Avatar
Rank Points: 1908
Registered: 12-09-2004
IP: Logged
icon Orb solver program (0)  
Does anyone have an orb solver program?

It seems like every other hold has to have an orb puzzle. If we just had a skip room key there wouldn't be any problem. Since we don't have such a feature yet, I either:

1. Quit the hold if it's not too fun anyway
2. Solve the room (using a spreadsheet if necessary)
3. Beg for the spoiler on the forum

If noone has a workable one, maybe I'll try writing one. Anyone gunna save me the hassle? Please...
08-01-2005 at 09:37 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
TripleM
Level: Smitemaster
Rank Points: 1373
Registered: 02-05-2003
IP: Logged
icon Re: Orb solver program (0)  
I have a little java one, not polished to look nice or anything but it works fine for me. You'll need java to run it of course, so let me know if you want it.
08-01-2005 at 10:59 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
larrymurk
Level: Smitemaster
Avatar
Rank Points: 1908
Registered: 12-09-2004
IP: Logged
icon Re: Orb solver program (0)  
TripleM wrote:
I have a little java one, not polished to look nice or anything but it works fine for me. You'll need java to run it of course, so let me know if you want it.

Sure, can you attach it and I'll have a look?

Maybe I'll start writing one in Visual Basic.
08-02-2005 at 07:13 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
TripleM
Level: Smitemaster
Rank Points: 1373
Registered: 02-05-2003
IP: Logged

File: OrbSolver.zip (4.1 KB)
Downloaded 252 times.
License: Other
From: Unspecified
icon Re: Orb solver program (+4)  
OK, here it is. Got both the class file(s) and the source, if you want to see how inefficient a programmer I am ;) Just run OrbSolver and follow the instructions.

Oh - if there is no solution, the program will just run forever. So if its found nothing after a few seconds, thats why.

[Last edited by TripleM at 08-02-2005 10:57 PM]
08-02-2005 at 10:57 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Syntax
Level: Smitemaster
Rank Points: 1218
Registered: 05-12-2005
IP: Logged
icon Re: Orb solver program (0)  
Out of interest, do you use it ?
Lovely piece of work... :thumbsup

Started one in .php last night, but starting feeling guilty so stopped, though I'll finish it off if anyone would like a non-java version.

[Morality starts to take its toll].

But hurry! Before I delete it :D
08-03-2005 at 07:46 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
TripleM
Level: Smitemaster
Rank Points: 1373
Registered: 02-05-2003
IP: Logged
icon Re: Orb solver program (0)  
Yeah, I use the program for any orb puzzle that I can solve in a couple of minutes. I used to solve them manually, but after a while it gets a little repetitive, unless theres some extra cool tricks about that particular puzzle.
08-03-2005 at 11:37 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
larrymurk
Level: Smitemaster
Avatar
Rank Points: 1908
Registered: 12-09-2004
IP: Logged
icon Re: Orb solver program (0)  
Syntax,

By all means crank out an orb solver.

I haven't managed to get TripleM's working yet. I tried downloading java runtime from Sun, what next?

I'm starting to write one in VB, but then people need to have Visual.net runtime and junk to run it. If you can create a standalone executable then you get my mod points.
08-03-2005 at 11:55 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
TripleM
Level: Smitemaster
Rank Points: 1373
Registered: 02-05-2003
IP: Logged
icon Re: Orb solver program (+1)  
Go into command prompt, and go to the folder where my class file is.
Then you'll need to type something like 'C:\\j2REx.xx\\bin\\java OrbSolver', or something like that, wherever you installed java. (Though usually people set the PATH variable on your computer so all you need to do is type 'java OrbSolver', but I can't remember the exact details for doing that.)

Edit - ok, heres a link for setting the path, if you are interested. Should work the above way, in any case. Good old stage 1 computing course website :)
http://www.cs.auckland.ac.nz/compsci101s1c/resources/path.html

[Last edited by TripleM at 08-04-2005 12:06 AM]
08-04-2005 at 12:03 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
Syntax
Level: Smitemaster
Rank Points: 1218
Registered: 05-12-2005
IP: Logged
icon Re: Orb solver program (+1)  
Yeah the path to java should be -cp.
So go to the class file directory and type:
java -cp . x.class

if the class is called x.

In DOS/Win:
If it says it can't find the java exec then either give the full path (by default c:\\javaxxRyy\\bin\\java) or type PATH=%PATH%;(and the directory to the bin\\java) then the java command by itself should work.

I don't think my php program would help much unless you got Apache installed. I was considering several languages and I picked that for visual purposes. If you do have Apache installed, I'll finish writing it. Otherwise, let me know in what form you want it (and please not VB! :closedeyes) :)

I think Java is probably your best bet if you just want to get something working, but maybe you eat Tomcat for breakfast ;)
08-04-2005 at 12:17 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
larrymurk
Level: Smitemaster
Avatar
Rank Points: 1908
Registered: 12-09-2004
IP: Logged
icon Re: Orb solver program (0)  
You guys are too funny.

Ok, I'll try the Java again using your sage advice :)
08-04-2005 at 12:58 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
larrymurk
Level: Smitemaster
Avatar
Rank Points: 1908
Registered: 12-09-2004
IP: Logged

File: java.png (23.9 KB)
Downloaded 1385 times.
License: Other
From: Unspecified
icon Re: Orb solver program (0)  
OK, what now?



[Last edited by larrymurk at 08-04-2005 03:14 PM]
08-04-2005 at 03:13 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5381
Registered: 02-04-2003
IP: Logged
icon Re: Orb solver program (+1)  
larrymurk wrote:
OK, what now?
Try "java OrbSolver" without the .java or .class, and note the case.


____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
08-04-2005 at 03:25 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
larrymurk
Level: Smitemaster
Avatar
Rank Points: 1908
Registered: 12-09-2004
IP: Logged
icon Re: Orb solver program (0)  
Schik wrote:
larrymurk wrote:
OK, what now?
Try "java OrbSolver" without the .java or .class, and note the case.

That was what I tried first. See top of image.
08-04-2005 at 03:54 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5381
Registered: 02-04-2003
IP: Logged
icon Re: Orb solver program (+1)  
larrymurk wrote:
Schik wrote:
larrymurk wrote:
OK, what now?
Try "java OrbSolver" without the .java or .class, and note the case.

That was what I tried first. See top of image.
No, you typed orbsolver in all lowercase. Try it just as I typed - "OrbSolver".


____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
08-04-2005 at 04:01 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
larrymurk
Level: Smitemaster
Avatar
Rank Points: 1908
Registered: 12-09-2004
IP: Logged
icon Re: Orb solver program (0)  
And... celebration!!!
Capitalization matters. Who'd have guessed?

If enough people help, even I will finally manage. Cool, it works.

Thanks folks, now to see if I can get past some of these orb puzzles that I've been holding off on.

Maybe this should be in the Developmant forum..

[Last edited by larrymurk at 08-04-2005 05:25 PM]
08-04-2005 at 04:48 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Alneyan
Level: Smitemaster
Rank Points: 622
Registered: 07-06-2004
IP: Logged
icon Re: Orb solver program (0)  
*Bump* Thank you TripleM for your program. It comes in very handy for those orb puzzles, and works perfectly well.

If you want to set it up a bit more automatically, there may be an alternative. I had some good results using a crude .bat file running the thing, followed by pause and copy-pasted a couple more times.

Pause allows to write down the output, and the multiple occurrences of the program allow to more easily correct a mistake, if one has been made... though I suppose it wouldn't help if the program froze (Break might be able to break, though). While not exactly elegant, I've found a .bat file to be more convenient to use, and it does not require any other modification to work.
01-11-2006 at 03:30 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
TripleM
Level: Smitemaster
Rank Points: 1373
Registered: 02-05-2003
IP: Logged
icon Re: Orb solver program (0)  
Yeah, something like that would make it a lot more user friendly to use.
Actually, now that I've been reminded about this, I may turn it into c/c++ just so that you can get an .exe rather than need java. Maybe.
01-11-2006 at 10:33 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Chris
Level: Master Delver
Rank Points: 144
Registered: 08-12-2005
IP: Logged

File: OrbSolver.zip (5 KB)
Downloaded 120 times.
License: Other
icon Re: Orb solver program (+2)  
I've modified the java program a bit, making the following changes:

* if there's no solution, the program stops and tells you so

* after solving an orb puzzle, the program goes back to the beginning in case you have any more to solve. type 'quit' to quit

* when entering door states and orb actions, you can use 'o', 'c', 't' and 'n' for open, close, toggle and nothing, instead of having to type numbers

I think that's about all. You run it in just the same way as TripleM's original.

I've specified license "other", since that's how TripleM's original code was licensed too.

Chris.
01-12-2006 at 06:08 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Alneyan
Level: Smitemaster
Rank Points: 622
Registered: 07-06-2004
IP: Logged
icon Re: Orb solver program (0)  
I could find some use for a C program, if only to make me look up compilling C programs under Linux, but the Java program works well enough for me.

I like the sound of these changes, Chris.
01-12-2006 at 10:16 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
larrymurk
Level: Smitemaster
Avatar
Rank Points: 1908
Registered: 12-09-2004
IP: Logged
icon Re: Orb solver program (0)  
Sounds great Chris!
01-12-2006 at 02:09 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Chris
Level: Master Delver
Rank Points: 144
Registered: 08-12-2005
IP: Logged

File: OrbSolver.zip (4.9 KB)
Downloaded 107 times.
License: Other
icon Re: Orb solver program (+2)  
Another couple of small improvements:

* displays all the solutions it can find, rather than just the first one
* typing "quit" to quit really works now (!)

For example:

Click here to view the secret text

Chris.
01-12-2006 at 03:49 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
StuartK
Level: Smitemaster
Avatar
Rank Points: 564
Registered: 06-10-2003
IP: Logged
icon Re: Orb solver program (0)  
Would these solvers find solutions which require hitting an individual orb twice?
01-12-2006 at 07:20 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Alneyan
Level: Smitemaster
Rank Points: 622
Registered: 07-06-2004
IP: Logged
icon Re: Orb solver program (0)  
I would think so; for example, using TripleM's program, I got the following to work. More complicated puzzles should work the same, barring the usual bugs, technical complications, and the like.

Enter initial arrangement of doors (0 closed, 1 open), eg 001100
> 10
Enter what each orb does, separated by commas (0 close, 1 open, 2 toggle, 3 nothing), eg 01233,00323,13333
> 21
Hit orbs 1 1

[Last edited by Alneyan at 01-12-2006 07:29 PM]
01-12-2006 at 07:27 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Chris
Level: Master Delver
Rank Points: 144
Registered: 08-12-2005
IP: Logged
icon Re: Orb solver program (0)  
My version of TripleM's program finds the same solution (unsurprisingly, since it's using almost exactly the same algorithm):

Enter initial arrangement of doors: closed (c), open (o), eg. ccoocc, or 'quit' to quit.

doors> OC

Enter what each orb does, separated by newlines.
Enter a blank line when you've finished.
  close (c), open (o), toggle (t), or nothing (n or space or '.'), eg.
  cot..

       __
orb 1> TO
orb 2> 

Hit orbs 1 1

Found one solution, but there may be more.


Chris.
01-12-2006 at 11:12 PM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Atch
Level: Delver
Rank Points: 81
Registered: 08-29-2003
IP: Logged

File: Deep Hold end room orb puzzle.jpg (194.9 KB)
Downloaded 122 times.
License: Public Domain
icon Re: Orb solver program (+1)  
The final room in Deep Hold (Level 25: 2S, 1W) is a hideous orb puzzle with no less than 25 orbs and 25 gates to be opened. It doesn’t appear to have a logically simple solution so I thought that TripleM’s Orb Solver would do perfectly. Unfortunately I didn’t even get as far as Larry with Java – when I tried to run OrbSolver, I got the error message: Launch File Error. The following required field is missing from the launch file: <jnlp>. – this means absolutely nothing to me but, judging from the Net, it appears to be a common problem.

Before I waste any more of my or anyone else’s time: is there a size limit, can the program cope with 25 gates, or is it too many? If it can cope then could someone do me a favour and run the data that I give below:

25 gates, all closed at start:

0000000000000000000000000

25 orbs do the following:

3333313333033333033133323,2333330333333333333303313,3333333333233332332333333,
3323333333300332133333333,3333333330303133333031333,3233332333332333333333333,
3113333233333333333030333,3333333333323213333303333,3333323322323333333333000,
3333313310333333333333333,3333313133333333203323333,2322333333333333333332323,
3333333332233311033333333,3333333333333333333303030,3333333333333333333223233,
3333231033333333333333333,3033333333302233333333333,3333333333333323223333333,
3333333213333333330033333,3333332331333333333333301,3333233233333333333333333,
3333333223333103313333333,3333333330333333331333330,3333333333333233333333332,
3333233323333003331333333,

The data is presented with 0 = close, 1 = open, 2 = toggle and 3 = nothing – should there be a final comma? Please let me know if you would prefer it presented some other way, cotn for example.

If there is no solution then I wouldn’t be surprised if I have made a transcription error with so many figures. The attached screenshot shows the data on a spreadsheet: I could post the Excel file if it would help.

Thanks in advance.

03-30-2006 at 04:33 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5381
Registered: 02-04-2003
IP: Logged
icon Re: Orb solver program (+1)  
Atch wrote:
If there is no solution then I wouldn’t be surprised if I have made a transcription error with so many figures. The attached screenshot shows the data on a spreadsheet: I could post the Excel file if it would help.
I plugged your numbers into the program, and left it running while I was away from my desk for about 45 minutes. It didn't come up with any solutions.... yet?

Hopefully someone who has completed the room can just give you the solution.

____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
03-30-2006 at 05:22 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
kzc
Level: Master Delver
Avatar
Rank Points: 212
Registered: 04-21-2005
IP: Logged
icon Re: Orb solver program (+1)  
Schik wrote:
Atch wrote:
If there is no solution then I wouldn’t be surprised if I have made a transcription error with so many figures. The attached screenshot shows the data on a spreadsheet: I could post the Excel file if it would help.
I plugged your numbers into the program, and left it running while I was away from my desk for about 45 minutes. It didn't come up with any solutions.... yet?

Yeah, looking at the algorithm I think processing time is going to be prohibitive for 25 orbs/doors. It probably wouldn't be worth the time to try to come up with with some kind of smart, heuristic-based solver, but it would probably be more interesting than trying to solve orb puzzles "by hand".
03-30-2006 at 05:38 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
RoboBob3000
Level: Smitemaster
Avatar
Rank Points: 1978
Registered: 10-23-2003
IP: Logged
icon Re: Orb solver program (+7)  
Just eyeballing this, I think I see a solution.

Click here to view the secret text


____________________________
http://beepsandbloops.wordpress.com/
03-30-2006 at 08:09 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Stefan
Level: Smitemaster
Avatar
Rank Points: 2119
Registered: 05-25-2004
IP: Logged
icon Re: Orb solver program (+7)  
Schik wrote:
I plugged your numbers into the program, and left it running while I was away from my desk for about 45 minutes. It didn't come up with any solutions.... yet?
When I solved this room, I tried letting it run for as long as it wanted, but after a couple of hours it failed with a memory overflow error (even after increasing the maximum stack size). So, I entered the orb configuration into an orb solver I've made myself (it hasn't been released, and isn't going to be either, probably), let it run for a while, and it came up with a solution (in case anyone's wondering, the algorithm I used is a bit different, and uses less memory than TripleM's program. Instead, it uses a whole lot more processing power and is much slower).

The solution my program gave me was:
Click here to view the secret text
I can also tell you that this is the (well, at least an) optimal solution (least number of orbs hit).

____________________________
0.099³

[Last edited by Stefan at 03-30-2006 11:20 PM]
03-30-2006 at 11:18 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Atch
Level: Delver
Rank Points: 81
Registered: 08-29-2003
IP: Logged
icon Re: Orb solver program (0)  
RoboBob3000 wrote:
Just eyeballing this, I think I see a solution.
This is unbelievable RoboBob, I stand in awe! Are you good at chess? Needless to say your solution is correct except, as you'd know, your first orb must be struck before three others, so not necessarily first. Forgive my maths but does this give 10,080 least orb solutions to the puzzle?

Thanks too to Stefan, you must be a supreme programmer, but why are you keeping your program to yourself? It wouldn’t mean anything to me but surely others would be interested. I had envisaged something like 25^25 iterations taking many thousands of billions of years to compute.

Well, at the end The Red Hawk promises us Deep Hold Part Two… THE ONSLAUGHT!!!!! but, happily for me, orb rooms like this are extinct in Drod’s modern era – at least they wouldn’t get passed any formal beta testing.


[Last edited by Atch at 03-31-2006 03:22 PM]
03-31-2006 at 11:49 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
Page 1 of 3
23
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : General : Orb solver program
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.