Algorithms for high-performance brain-computer interfaces