Skip to main content

University faculty member — Ph.D. in Artificial Intelligence and Robotics

اللّهُمَّ عَجِّلْ لِوَلِیِّکَ الْفَرَج

Interactive AI Lab

See important AI algorithms come alive and experiment with them: a genetic algorithm that evolves a solution to the N-Queens puzzle generation by generation, an algorithm that uncovers hidden groups in a social network, search algorithms that find their way out of a maze, and chess against an AI that thinks with adversarial search (minimax and alpha-beta) and shows you its thoughts. Everything runs in your browser.

Click to add points

Run console kmeans.log
    Iteration
    0
    Error (SSE)
    —
    Points that moved
    —
    Step
    —

    How it works

    K-means needs no labels (unsupervised learning). It repeats two steps: assign every point to its nearest centre, then move every centre to the mean of its points. Each round lowers the sum of squared distances (SSE), so it always stops — but perhaps in a local minimum, which is why the start matters: k-means++ picks centres far from each other.

    Try “two rings”: K-means looks for round, compact groups and cuts the rings in half. The elbow table helps choose K: where one more cluster stops lowering the error much. AI course materials