Algorithm
- Start with a random variable assignment.
- If the formula is satisfied, return the current assignment.
- Flip a variable that maximizes the number of satisfied clauses. †
- If more flips are allowed, go to step 2.
- If more tries are allowed, go to step 1.
- Return a failure.
† Ties are broken randomly.