In AlphaGo-style Monte Carlo Tree Search, the PUCT (Predicted Upper Confidence with Trees) rule selects which child of a node to expand. Each child a stores:
The parent node has total visit count N (the sum of its children's visit counts, or a provided value). Given an exploration constant c_puct, the rule selects the child that maximizes:
Implement puct_select(Q, N_children, P, N_parent, c_puct) that takes lists/arrays of Q values, child visit counts, priors, the scalar parent visit count, and the scalar exploration constant, and returns the integer index of the selected child. If multiple children tie for the maximum score, return the smallest index.