|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.act365.sudoku.StrategyBase
com.act365.sudoku.LeastCandidatesHybrid
LeastCandidatesHybrid combines the Least Candidates Cell and Least Candidates Number strategies.
| Constructor Summary | |
LeastCandidatesHybrid(boolean randomize)
Sets up a LeastCandidatesHybrid strategy with an optional random element. |
|
LeastCandidatesHybrid(boolean randomize,
boolean checkInvulnerable,
boolean explain)
Sets up a LeastCandidatesHybrid strategy with an optional random element. |
|
| Method Summary | |
int |
findCandidates()
Finds candidates for the next move. |
int |
getLastWrittenMove()
Determines the last move for which two or more alternatives existed. |
void |
setup(Grid grid)
Sets up the strategy to solve the given grid. |
boolean |
unwind(int newNMoves,
boolean reset)
Unwind the stack. |
void |
updateState(int x,
int y,
int value,
java.lang.String reason,
boolean writeState)
Updates state variables. |
| Methods inherited from class com.act365.sudoku.StrategyBase |
explainsReasoning, getBestReason, getBestValue, getBestX, getBestY, getNumberOfCandidates, getReason, getReasonCandidate, getScore, getThreadLength, getThreadX, getThreadY, getValueCandidate, getXCandidate, getYCandidate, reset, reset, selectCandidate, setCandidate, toString |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.act365.sudoku.IStrategy |
explainsReasoning, getBestReason, getBestValue, getBestX, getBestY, getNumberOfCandidates, getReason, getReasonCandidate, getScore, getThreadLength, getThreadX, getThreadY, getValueCandidate, getXCandidate, getYCandidate, reset, reset, selectCandidate, setCandidate, toString |
| Constructor Detail |
public LeastCandidatesHybrid(boolean randomize,
boolean checkInvulnerable,
boolean explain)
randomize - whether the final candidates should be chosen randomly from its peerscheckInvulnerable - indicates whether the moves should be post-filtered using the Invulnerable state grid.explain - whether explanatory debug should be producedpublic LeastCandidatesHybrid(boolean randomize)
| Method Detail |
public void setup(Grid grid)
throws java.lang.Exception
setup in interface IStrategyjava.lang.ExceptionIStrategy.setup(Grid)public int findCandidates()
findCandidates in interface IStrategyIStrategy.findCandidates()
public void updateState(int x,
int y,
int value,
java.lang.String reason,
boolean writeState)
throws java.lang.Exception
updateState in interface IStrategyupdateState in class StrategyBasejava.lang.ExceptionIStrategy.updateState(int,int,int,String,boolean)
public boolean unwind(int newNMoves,
boolean reset)
unwind in interface IStrategyunwind in class StrategyBaseIStrategy.unwind(int,boolean)public int getLastWrittenMove()
getLastWrittenMove in interface IStrategygetLastWrittenMove in class StrategyBase
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||