Solve 3D Visit-Once Tree Puzzle with 16x16x16 Grid

  • Thread starter intervoxel
  • Start date
  • Tags
    3d Tree
In summary, the conversation is about building a software function that explores a 3d grid, visiting each cell only once. The person is looking for a solution and asks for help and references. They also ask for comments and suggestions to improve their code. The main goal is to generate a space-filling tree, but the current solution leaves gaps. The person asks for suggestions on whether a polygonal path would be acceptable.
  • #1
intervoxel
195
1
I'm trying to build a software function that explores a 3d grid visiting the cells just once. The file below is my last attempt, which misses some cells (for 16x16x16 it visits 3436 cells instead of 4095). Can anyone give me a reference to a solution, please.
 

Attachments

  • tree.pdf
    172.3 KB · Views: 240
Physics news on Phys.org
  • #2
I don't want to spend a whole lot of time on this, so you have to make things easy for me.
So how is boolean function isAllowed() used?
What is object principal?
Could you put your listing in single space so I can see more of it at a time?
Could you add some comments so that I don't have to figure it out from scratch?
 
  • #3
I appreciate your interest in my problem, Scott. I prepared a simplified running demo, avoiding my program notation. The main goal is to generate a always expanding tree, filling completelly the space, as shown schematically in the figure. The present solution leaves gaps, which I could not solve. Thank you for any help.
 

Attachments

  • tree.png
    tree.png
    64.5 KB · Views: 395
  • tree.pdf
    176.8 KB · Views: 203
  • #4
Does anyone know a reference to this subject? This seems like a problem solved a long time ago. Thanks for any help.
 
  • #5
Hi, Scott. Have you seen the code I posted? Any insights?
 
  • #7
Hi, DrGeg, I need an always expanding tree (no returns allowed).
 

1. What is a 3D Visit-Once Tree Puzzle?

A 3D Visit-Once Tree Puzzle is a type of puzzle where the goal is to visit each node of a tree exactly once. In this case, the puzzle is set on a 16x16x16 grid, making it a challenging 3D puzzle.

2. How do you solve a 3D Visit-Once Tree Puzzle?

The key to solving a 3D Visit-Once Tree Puzzle is to carefully plan out your moves and make sure you visit each node only once. It can be helpful to start from one corner of the grid and work your way towards the opposite corner, keeping track of which nodes you have already visited.

3. Are there any strategies for solving a 3D Visit-Once Tree Puzzle?

Yes, there are a few strategies that can be useful for solving this type of puzzle. One strategy is to start by finding the shortest path between two opposite corners of the grid and then working backwards to fill in the remaining nodes. Another strategy is to focus on one layer of the grid at a time, visiting each node in a zig-zag pattern.

4. How long does it take to solve a 3D Visit-Once Tree Puzzle?

The time it takes to solve a 3D Visit-Once Tree Puzzle can vary greatly depending on the individual's puzzle-solving abilities and the complexity of the puzzle itself. It could take anywhere from a few minutes to several hours.

5. Are there any tips for beginners attempting a 3D Visit-Once Tree Puzzle?

For beginners, it can be helpful to start with smaller grid sizes and work your way up to a 16x16x16 grid. It's also important to carefully plan out your moves and keep track of which nodes you have already visited. Don't get discouraged if it takes a few tries to solve the puzzle - with practice, you'll improve your skills and be able to solve more challenging puzzles.

Similar threads

  • Programming and Computer Science
Replies
4
Views
981
  • Advanced Physics Homework Help
Replies
7
Views
1K
  • Differential Equations
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • Astronomy and Astrophysics
Replies
1
Views
2K
  • Advanced Physics Homework Help
Replies
7
Views
3K
  • STEM Academic Advising
Replies
6
Views
2K
Replies
1
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
3K
Back
Top