Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: Using Trees

  1. #1
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using Trees

    How would I go about representing the following image in code? I have a slight understanding of trees and I know how I WOULD evaluate the bottom branch in order to get a value of 1 or 0, but I have no idea how I would pass that value up the tree. At this point I do no have any code for creating the tree.


  • #2
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    use foreach
    Last edited by vinyl-junkie; 04-22-2011 at 04:26 AM. Reason: Signatures only allowed through the control panel

  • #3
    New to the CF scene
    Join Date
    May 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't see how "use foreach" even close to answers my question. I'm not asking for an alternative.

  • #4
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by MatthewABlack View Post
    I don't see how "use foreach" even close to answers my question. I'm not asking for an alternative.
    i'm confuse about what you asked, you don't know how to implement the tree structure, how to populate the tree with utility values or how to use minimax to solve the problem?

    best regards

  • #5
    New to the CF scene
    Join Date
    May 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey thanks for the Reply. Sorry about name change, I am OP but didn't see my friends account logged on. I believe I am capable of implementing/populating but am just unsure of how to retrieve the values and "pass up" the values to higher layers like the image displays. I have code from lecture regarding in order, preorder, and post order traversing but I doesn't seem like it would accomplish the task at hand.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •