This is one of the main reasons why Einstein rejected the notion of an anthropomorphic "intellectual" god.
He viewed this notion (God COULD have known Adam would sin, but CHOSE not to peek) as a crutch manufactured by human theology in order to make God look "fair" when he made man (who eventually sinned) and then sentenced the man to death.
It is all tied up in the "free will" debate - and in a strictly analytical sense, if God even COULD have known what Adam would do - then Adam did not truly have "free will" or a "free choice" in the matter.
This is, of course, a popular JW teaching because they highly dislike the notion of predestination. But the teaching itself is rife with self-contradictions.