Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8130261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:38:53+00:00 2026-06-06T08:38:53+00:00

I’m creating a variant of a chess-like program that needs to simultaneously generate and

  • 0

I’m creating a variant of a chess-like program that needs to simultaneously generate and traverse a very large tree-like structure. Each node has 10 bools, an int, 8 ulongs, a short[64] and 2 ulong[64]s. The root node receives some initial parameters, then the valid children nodes are determined programatically (recursively) from there.

Basically, my program continuously grows this tree while the user and the program takes turns traversing from child node to child node. Each time a new child node is ‘chosen’, it’s parent and siblings are no longer needed and are discarded. As the tree reaches (on average) a depth of about 60 (from the initial root node), the number of valid children nodes will naturally begin to dwindle until at about a depth of about 75, the tree resolves into one final node with no further children.

The logic behind this looked fairly straight forward at first, but I’m constantly hitting an OutOfMemoryException that is outright killing any further progress.

The following at some averages for valid children per ‘generation’:

Generation    New Nodes
1             1    
2             20
3             4,000
4             30,000
5             2,200,000
6             > 50,000,000

In my actual program, I can’t even fully expand the fifth generation. When I don’t persist the node specific data (I clear a node’s data once it’s been used to determine it’s own children) I can fully expand the 5th generation, but hit a very solid wall partway though the sixth generation.

Ideally, I would like my program to eventually reach and then maintain 8 generations of nodes afer the ‘current’ node. The more I look at this, the less likely this seems.

I tired running this with an sqlite database, but it wasn’t able to grow the tree fast enough.

Does anyone know of any potential alternatives to dealing with a very large tree structure?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T08:38:55+00:00Added an answer on June 6, 2026 at 8:38 am

    Typically you have an evaluation when building the trees, which already gives you a weight on the edges. Use those weights to see which pathes will evaluate a stronger path than others and work on those edges, as soon as you can see which are more valuable. As you already have problems with the fifth generation in your algorithm, you only have choices to go in depth on higher weighed branches, and choose one of those, dismissing numberous other branches. just an idea so… perhaps you could run this on the third generation, choosing which way to go. As far as i know chess, this might run you into making only moves with more movable pawns as they probalby will have more impact on the game, which might not be the best solution as compared to fifth generation moves. very interesting issue!

    You should investigate on chess programming: Chess programming wiki

    Here is more on engines: Chess programming wiki on Engines

    There is a forum also, where different approaches are discussed!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.