Implementing the GSAT algorithm - How to select which literal to flip?
Isn't the maximum number of satisfied clauses what we're looking for?


Yes, we're looking for an assignment that satisfies the maximum number of clauses (that is all of them, preferably). And to that end we ask ourselves "Which single variable will bring us closest to this goal when flipping it?" and then flip it.


  It seems to me that we're trying to use the solution or approximations to it to find the solution.


Using the solution would be if we asked "Which combination of multiple flips would give the best result?" or simply "Which assignment would be the best?". However that's not what we're doing, we're only looking one step ahead. Using an approximation of the solution seems like an accurate description. However there's nothing wrong with that. That's how greedy strategies work.


  Generate a state space with all possible flips and search the space for a literal that results in the best approximation to the goal state.


Right.