Search Results

Search found 1 results on 1 pages for 'ranom'.

Page 1/1 | 1 

  • How to get a random node from a tree?

    - by ooboo
    It looks easy, but I found the implementation tricky. I need that for a simple genetic programming problem I'm trying to implement. The function should, given a node, return the node itself or any of its children such that the probability of choosing a node is normally distributed relative to its depth (so the function should return mostly middle nodes, but sometimes the root itself or the lowest ones - but that's not really necessary if that makes it significantly more complex, if all any node is chosen with equal probability, that's good enough). Thanks

    Read the article

1