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

requesting renaming from generateSucc -> getSucc #1

Open
stheid opened this issue Apr 12, 2022 · 1 comment
Open

requesting renaming from generateSucc -> getSucc #1

stheid opened this issue Apr 12, 2022 · 1 comment

Comments

@stheid
Copy link

stheid commented Apr 12, 2022

/**
* Generate the successors for a given node.
*
* @param node
* The node we want to expand.
* @return A list of possible next steps.
*/
public List<INewNodeDescription<N, A>> generateSuccessors(N node) throws InterruptedException;

The name of the function implies that it is only called in the generation process of the graph. However the function is called successfully with the same value and the algorithms seem to expect the same result.

This means i have to memoize the function to avoid double calculations.

Here is an example usage that shows that the function is not only used in the generation

https://github.com/starlibs/AILibs/blob/b355727b4cdeb5eda09a8fac15eca731bd8be5fd/JAICore/jaicore-search/src/main/java/ai/libs/jaicore/search/algorithms/mdp/mcts/GraphBasedMDP.java#L66

@stheid
Copy link
Author

stheid commented Apr 12, 2022

Maybe the whole class should rather be a "successorProvider"

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

1 participant