
karl3@writeme.com wrote:
karl3@writeme.com wrote:
how about a decision tree that is pleasantly empty! def EmptyDecisionTree: def __init__(self): pass def perform_work(self): return True def get_score(self): return "score: decision tree is completely empty"
maybe a decision tree for finding the _worst_ option? maybe somehow? something like (surely will be full of bugs) ... class WorstOptionDecisionTree: def __init__(self, func_state_pair, *child_func_state_pairs): self.child_scores = [WorstOptionDecisionTree(func_state_pair) for func_state_pair in child_func_state_pairs] self.child_results = [] self.func, self.state = func_state_pair def work_done(self): return len(self.children) == 0 def worst_score(self): return self.child_results[-1] if len(self.child_results) else float('inf') def perform_work(self): sort(self.children, key=lambda child:child.worst_score()) self.children[-1].perform_work() if self.children[0].work_done(): no i flubbed it maybe try simpler
traffick boss wanders around, pensating. could he be thinking of giant business plans?
interviewer: "traffick boss, what are you thinking about?"
traffick boss: "my mind is completely empty. i am thinking nothing. i actually have neuroscientists enforcing th--"
interviewer: "surely you are planning your next world-changing move. what are you think