March 2020
Beginner to intermediate
342 pages
8h 38m
English
Here’s an example of the difference between machine learning (or simply “ML”) and regular programming. Imagine building a program that plays video games. With traditional programming, that program might look something like this:
| | enemy = get_nearest_enemy() |
| | if enemy.distance() < 100: |
| | decelerate() |
| | if enemy.is_shooting(): |
| | raise_shield() |
| | else: |
| | if health() > 0.25: |
| | shoot() |
| | else: |
| | rotate_away_from(enemy) |
| | else: |
| | # ...a lot more code |
…and so on. Most of the code would be a big collection of if..else statements, mixed with imperative commands such as shoot.
Granted, modern languages give us the means to replace those ugly nested ifs with more pleasant constructs—polymorphism, pattern matching, ...
Read now
Unlock full access