Sign in to follow this  
n14Charlie

[java] minimax tree - out of memory:Java heap space

Recommended Posts

n14Charlie    122
I'm creating the game checkers using a minimax tree and each nodes contain a possible movement of the pawns.. when I run the minimax algorithm for depths of more than 5 I get a "OutOfMemoryError: Java heap space" , can anyone help?

Share this post


Link to post
Share on other sites
ddyer    262
You can increase heap space, but searches easily reach into millions of nodes.
Usually one does not keep the nodes, only nodes of special interest such as the principle variation.

Share this post


Link to post
Share on other sites
elFarto    206
If you're not passing in any parameters, the JVM will default to 64MB heap size. Try passing in '-Xms512m -Xmx512m', this will give you a 512m heap.

Regards
elFarto

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this