From my understanding, the oracle function in Grover's algorithm is used as a way to check for the desired outcome.
I have looked at this example which implements the Exactly-1 3-SAT problem and the oracle function follows some rules which only returns True for the correct solution. I have also looked at this which looks for two marked states.
In the second example it looks like the exact solution is given to the oracle which I don't understand as I thought we are supposed to be searching for the solution.
I was wondering if I am misinterpreting this and also how an oracle function can be created if we don't know the rules (like a maze)?