point 1 to remember: Even though G-d knows the future, he doesn't judge us based on that but rather based on our present level.
So for example when Yishmael the son of Avraham{Abraham} was in danger of death due to a lack of water, G-d chose to supply him with water, due to the merits he had at that particular time when he was in danger, even though, had he been judged on his evil impact on the future he would not have merited to get the water, see Rashi's commentary to Breishit/Genesis21:17 for more details.
There is "a fundamental principle that G-d does not judge the world according to his knowledge but according to the system that he desired and designed for this purpose". (quoted from the Way of G-d by Moshe Chaim Luzzatto as translated by Aryeh Kaplan page 154, Feldheim Publishers, year,5748-1988)
point 2 Time is a creation and G-d is outside of time. Just as someone observing someone else from a distance doesn't affect the free will of the other party, so too, G-d observes from outside of time all the segments of time and the actions we do in those segments. His observation doesn't affect our free will actions.
Not everyone easily grasps this second point, but it makes sense to me and that's how I have been taught.