|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvooga.aiEngine.Algorithms.AbstractAlgorithm
vooga.aiEngine.Algorithms.NPSolver
public class NPSolver
NPSolver.java
Constructor Summary | |
---|---|
NPSolver()
|
Method Summary | |
---|---|
java.util.ArrayList<java.lang.String> |
backtrack(java.util.ArrayList<java.lang.String> in,
int level)
backtrack - goes back a step to see if the puzzle can be solved given a different parameter. |
char[][] |
findCrossword(char[][] grid,
java.lang.String[] dictionary)
findCrossword - given a grid and an array of strings representing a dictionary, this tries to fill in a blank crossword puzzle without clues. |
void |
perform(java.lang.Object... args)
Performs an arbitrary algorithm with arbitrary parameters. |
Methods inherited from class vooga.aiEngine.Algorithms.AbstractAlgorithm |
---|
performWithDelay, setDelay |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NPSolver()
Method Detail |
---|
public char[][] findCrossword(char[][] grid, java.lang.String[] dictionary)
grid
- - A Character matrix that lets the computer put in words and
double check whether or not every word is in the dictionary.dictionary
- - A string array representing the entire contents of a
dictionary.public java.util.ArrayList<java.lang.String> backtrack(java.util.ArrayList<java.lang.String> in, int level)
in
- - the current list of results, to be checked for completeness
or updated to go back a step.level
- - The number of constraints that have been satisfied thus far.public void perform(java.lang.Object... args) throws java.lang.RuntimeException
AbstractAlgorithm
perform
in class AbstractAlgorithm
java.lang.RuntimeException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |