Jump to content
  • Advertisement
Sign in to follow this  
n14Charlie

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

This topic is 3472 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!