https://github.com/allankoder/spellcastsolver
Optimized and competitive solver for SpellCast
https://github.com/allankoder/spellcastsolver
spellcast spelling wordgame wordgames
Last synced: 9 months ago
JSON representation
Optimized and competitive solver for SpellCast
- Host: GitHub
- URL: https://github.com/allankoder/spellcastsolver
- Owner: AllanKoder
- Created: 2024-02-26T02:25:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-15T00:43:51.000Z (over 1 year ago)
- Last Synced: 2025-08-20T19:12:36.666Z (10 months ago)
- Topics: spellcast, spelling, wordgame, wordgames
- Language: Python
- Homepage:
- Size: 1.38 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SpellCast Solver
An application for the Discord Game SpellCast. Spellcast is very similar to Boggle, where you try to find the best word possible
I saw some existing solutions out there and wanted to make a faster and cleaner solution. My application can support up to 4 substitions within a minute.

_blue tile is the start of the word_
_red tile is a tile that needs to be substituted_
### Speed Improvements
Using a heap and priority prefix tree, where prefixes that lead to a higher word at the leaf are prioritized more, we can navigate through all the best words first. Afterwards, we will reach a point where the word in the heap, even with the double word multiplier and triple letter bonus, cannot beat the existing best solution. This is where we can halt.

In this diagram, we have a example of early stopping. There can be other heuristics added to this, where if we reach too small of a slope, we can stop the search.
### How to run:
**For Backend:**
```
cd spellCastSolverBackend
py -m uvicorn main:app
```
**For Frontend:**
```
cd spellCastUI
npm run dev
```
### Features:
- Up to 4 substitions
- Very fast for competitive gameplay
- Clean and easy UI
- Can edit the margin of error for higher speed
- Has a higher average case time complexity than a bruteforce prefix tree search.
### Potential Improvements:
- Using Monte Carlo for determining if shuffle is optimal
- Accounting for gems and optimal gem collection