Guessing or reasoning? A philosophical account of hypothesis