Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> It’s called the function machine game. I will think of a function machine. You tell me things to put into the function machine, and I will tell you what comes out. Then you have to guess what the function machine does.

Cool, this sounds like a general form of the picnic game[0].

An input to the "picnic" function is a food (or other object), and the output is whether or not it can be brought to the picnic. The picnic game's hidden function that needs to be uncovered is a predicate function. E.g. if the hidden function is "Things that start with the letter A", then "apples", "anchovies", and "albatrosses" could be brought to the picnic, but not "bananas", "cameras", nor "dessert". In that example, the function would look like:

  lambda x: x.firstLetter() == 'a'
[0] https://www.thegamegal.com/2011/06/11/going-on-a-picnic/


my favorite snack is "" ! (pronounced " ")




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: