Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightbox Solver #1826

Closed
inewman opened this issue Apr 23, 2018 · 4 comments
Closed

Lightbox Solver #1826

inewman opened this issue Apr 23, 2018 · 4 comments

Comments

@inewman
Copy link

inewman commented Apr 23, 2018

Since RuneLite solves most (all?) other clue scroll puzzles, I think it would be good if it could also solve a Lightbox (item name: Light box) from master clues.

I would like to work on this myself. I have already implemented the logic for a reasonably efficient solving pattern that attempts to find a solution after pressing each button (only guaranteeing a found solution after having pressed all buttons, but attempting a solution as soon as a new controlled set of lights is discovered). I'll submit a PR once I obtain a Light box in-game and can set up the visuals.

@Jalopyy
Copy link

Jalopyy commented Apr 23, 2018

Something like this already exists if you wanted to look at the code to make something similar for Runelite. I personally use the first one because it hooks to the client and does it all for me after you run it in python.

https://github.com/subjectivelyobjective/osrs-lightbox-solver

https://osrs-lightbox-solver.fletom.com/

@inewman
Copy link
Author

inewman commented Apr 23, 2018

I didn't know about the first one, but I did know about the second one. That's pretty cool. My solving logic is much like fletom's (except I attempt a solution after pressing each button as opposed to identifying the lights controlled for every button before attempting a solution). Thanks for the info.

@Jalopyy
Copy link

Jalopyy commented Apr 23, 2018

I'd probably only make it give a solution after you click every button. If it tries to solve it and fails after a click or two people will probably assume it's broken and submit a ticket/complain.

@inewman
Copy link
Author

inewman commented Apr 23, 2018

It won't visibly fail if it doesn't immediately find a solution, it'll ask you to press the next button until it has enough information to solve the puzzle.

Basically, the process is:

"Press A"
User presses A
Save changed lights as A's matrix
Check if solution is possible using current known matrices (currently just A), if so, display solution.
"Press B"
User presses B
Save changed lights as B's matrix
Check if solution is possible using current known matrices (currently just A and B), if so, display solution.
"Press C"
User presses C
Save changed lights as C's matrix
Check if solution is possible using current known matrices (currently just A, B, and C), if so, display solution.
etc. until solution is found (which is guaranteed when every button is pressed once).

Many solutions will be known before H or even G are pressed, so it speeds the process up for the players by reducing the number of perceived steps needed to solve the puzzles most of the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants