Artificial Intelligence
Machine learning, neural networks, and the graph algorithms behind route finding.
Match each description to the part of an expert system.
PICK ONE, THEN PICK ITS GROUP
- empty
- empty
- empty
- empty
- empty
//The three kinds of learning
Supervised: trained on labelled examples where the right answer is known — spam or not spam. Unsupervised: finds structure in unlabelled data, such as grouping customers by behaviour. Reinforcement: learns by trial and error from rewards and penalties — how a program learns to play a game.
//Neural networks in plain words
Layers of connected nodes: an input layer, one or more hidden layers, and an output layer. Each connection has a weight. Data flows forward, the output is compared with the correct answer, and the weights are adjusted so the error shrinks — repeated over many examples. 'Deep' learning simply means many hidden layers.
//Dijkstra's algorithm
Set the start distance to 0 and every other to infinity. Repeatedly take the unvisited node with the smallest distance, update each neighbour if going via this node is shorter, and mark it visited. Stop when the destination is visited.
Node A B C D
start 0 ∞ ∞ ∞
via A 0 4 2 ∞
via C 0 3 2 6 (A→C→B = 2+1 = 3, better than 4)
via B 0 3 2 5//Why A* is faster
Dijkstra explores outwards in every direction equally. A* adds a heuristic — an estimate of the distance still to go, such as straight-line distance — so it prefers nodes that head towards the goal and examines far fewer of them. The estimate must never overestimate, or the route found may not be the shortest.
CHECK YOURSELF
1.Training a model on emails already labelled 'spam' or 'not spam' is:
2.Why does A* usually examine fewer nodes than Dijkstra?