Matlab code to simulate winner-take-all networks that solve constraint satisfaction problems (graph coloring, maximum independent set, sudoku). Networks use non-saturating rectification functions and are stable purely by inhibitory-excitatory balance.