Decision-making is an unobservable cognitive process. This makes it challenging to investigate the underlying neuronal mechanisms. This lecture will discuss how techniques borrowed from the brain-machine interface field, such as decoding population activity and closed-loop control, can be used to understand how cognitive processes such as decision-making are implemented at the neuronal level. This approach could also lead to the development of novel devices for the treatment of neuropsychiatric disorders that involve impaired decision-making.