Brute force

Brute force is a very general problem-solving technique that consists of systematically listing all the possible values that could represent a solution and check whether each value satisfies the conditions imposed by the problem.

A brute-force algorithm is simple to implement, and will always find a solution if it exists, but its cost is proportional to the number of possible solutions. Therefore, brute-force research is typically used when the size of the problem is limited or when hypotheses are available that allow us to reduce the set of possible solutions. The method is also used when the simplicity of implementation is more important than speed.

Brute force is the most immediate solution to the knapsack problem: examine ...

Get Keras Reinforcement Learning Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.