The relative pronouns that and which are easily confused, and there is no definitive correct usage; furthermore, these words are often used differently in speech. However, the two words are generally not used in an exactly identical fashion in writing. That often refers only to the noun just before the word that, and the word is commonly used to introduce restrictive clauses (see below).
These simple rules yield a puzzle that cannot be solved through trial and error.
The phrase “that cannot be solved through trial and error” is called a restrictive or defining clause, and it adds crucial information about the word “puzzle”. A restrictive clause can not be set off by a comma.