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

idea: demo / solver for simple games #398

Open
hajo4 opened this issue Oct 13, 2024 · 1 comment
Open

idea: demo / solver for simple games #398

hajo4 opened this issue Oct 13, 2024 · 1 comment

Comments

@hajo4
Copy link

hajo4 commented Oct 13, 2024

Some games have no demo,
But I think it might be fairly easy to come up with an algorithm
for 'simple games' like Hanoi, Matrix, and maybe LightsOut.

Where would the code for such an extension go,
and should that be a solver, plugin or demo ?

Also, any advice about how to start coding for pysol ?

@joeraz
Copy link
Collaborator

joeraz commented Oct 13, 2024

The information on how to get started contributing is in https://github.com/shlomif/PySolFC/blob/master/CONTRIBUTING.md - I can answer more specific questions you might have.

I've been wanting to get demos added to the remaining games that are currently missing them - this would help support a number of new features. To add a demo to a game that's missing one, the best place to start would be the hint logic. The demo follows the hints, and the lack of hint logic for a given game is what causes the demo to be disabled. It typically has to be disabled if the default hints have issues and we've been unable to write a custom hint class. This typically happens if the hints suggest invalid or random moves, cause the demo to get stuck in a loop, or don't work with the nature of the game in question.

Look for the line "Hint_Class = None" and replace it with a working hint class to enable the demo for that game. The hint.py file contains the abstract/default hint logic.

The solver is more for integration with solver apps such as https://fc-solve.shlomifish.org/ https://www.shlomifish.org/open-source/projects/black-hole-solitaire-solver/ - it doesn't really affect the demo unless you run the demo using the solver. And plugins are more for custom add-ins outside of the main code.

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

No branches or pull requests

2 participants