ferrisx4 / chainreaction Goto Github PK
View Code? Open in Web Editor NEWAutomated Solver for the Chain Reaction TV Show
Automated Solver for the Chain Reaction TV Show
The check for uniqueness was not made in end cases where the last word in the chain already existed in the chain.
Ideally a solution to this would be to check if the Ending word provided in the user's argument exists in the chain at all before the chain is long enough. In this way, the algorithm would chuck out any candidate chains early before filling out the rest of the chain.
An easier solution to implement would be to simply check for uniqueness before checking for valid chain.
Should the word list be automatically alphabetized, including the children words of each parent?
Pros:
Cons:
This seems like an obvious decision.
Several "actions" result in the same exact code being run, as follows:
array_pop($chain);
$depth -= 1;
These can be consolidated into a single action response to cut down on if statement processing.
The following actions all result in the above code firing, as well as any unhandled actions:
reached_chain_length_target
no_child
chain_found
for some reason. This should be its own issue.already_in_chain
premature_chain
In a few of these, decrementing depth comes before popping the array, but this probably doesn't matter.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.