God is all-knowing. That he knows everything, including what choices we are going to make, even before we make them.
I've heard a couple things argued about this: If we make a choice that God was not aware of, then God is not omniscient; Since God is omniscient, and he knows every choice we make, we aren't really making a choice, because the outcome has already been determined; If God is omniscient, and our choices have already been determined through his foreknowledge, ie. a form of predestination, then we don't have agency (free will).
It would seem, then, that the doctrine of free will, or agency, is incompatible with the doctrine of God's omniscience. How have others attempted to solve this puzzle? I don't believe they have. The FAIR Wiki entry, which can be found here, concludes, "We know from the scriptures that God can exactly predict the future, but we also know from the scriptures that we have our moral agency to decide our future. There must be a solution to this problem, but there is as yet no generally-accepted solution." I believe I have found a possible solution.
This puzzle seems to pivot on the doctrine of God's omniscience. I would like to submit that we are all omniscient, to a degree. It is said, "Hindsight is 20/20". Tis true! Hindsight is a perfectly clear picture of the events that have transpired. Let's pretend that you are sitting on a bench observing the goings-on of a man walking his dog. He enters your view at 7:05 pm, and proceeds to walk across your span. His dog is sniffing the ground and comes to a stop. He begins to walk around the spot, and in time stops, and does his business. The man, knowing the park rules, then pulls a baggy out of his pocket, bends down, picks up the mess, closes the bag, and proceeds to find a trash can. He exits your view at 7:15 pm. This event happened in the course of 10 minutes of time. This event is now in the past.
What can we say at this point? We can say that you have seen that a man and his dog walked within your view, the dog did his business, and the man cleaned up after his dog, all between the minutes of 7:05 pm and 7:15 pm. You have a perfect knowledge of the event (irrelevant to our discussion is what was happening inside the man's and dog's minds). We can say that as you reflect on the state of affairs at 7:05 pm, you have a perfect foreknowledge of what will transpire for the next 10 minutes. You are, it can now be said, sitting outside of this frame of time. However, knowing what the man is going to do in the next 10 minutes, you have not in any way diminished his agency. He still has the ability to choose for himself his course of action.
In Moroni 7:22, we read, "God knowing all things, being from everlasting to everlasting..." In Doctrine & Covenants 38:2, we find God declaring that "all things are present before mine eyes." And in Abraham 2:8, God says, "My name is Jehovah, and I know the end from the beginning." And thus we have our solution. I believe these verses demonstrate the God sits outside of our frame of time. He sees the beginning to the end. Like an unrolled scroll, he sees from everlasting to everlasting. Let us not misconstrue this to mean that everything God sees happened in his past. God has also been an actor, as the scriptures record. It seems that although he sees from the beginning to the end, he is still able to insert himself into the story. Perhaps our understanding of this process will increase as we approach exaltation.
In our exercise above, you now sit outside of that frame of time. You are now able to see the beginning, 7:05 pm, to the end, 7:15 pm. This is but a taste of how God looks upon our existence. I would argue that this is a rather incomplete view of how God looks upon us, nevertheless, I believe we have solved our puzzle. Our sitting outside of the frame of time during which a man walked his dog and cleaned up after him in no way affected the man's agency and ability to choose for himself his course of action. We are now as God, concerning those 10 minutes.
Consider everything you've ever done or witnessed. As an observer of the past, you have the foreknowledge of how any given event will turn out, and of how any given actor will act. This foreknowledge does not destroy the agency of the actors, and neither does God's foreknowledge destroy our agency.
UPDATE: I've been forced to reconsider my definitions. Here's my self-rejoinder.