The invention provides an assembly comprising: - a recording assembly for recording a time-based brain-related signal; - a stimulus generator for providing a stimulus, and - a computer assembly, functionally coupled to said recording assembly and to said stimulus generator, said computer assembly comprising: - a memory for storing at least a data segment of said time-based brain-related signal during recording of said time-based brain-related signal, and - a computer program which, when running on said computer assembly, functionally real-time performs: - retrieving a most-recent data segment of said stored data segment of said time-based brain-related signal; - fitting at least one curve to said retrieved most-recent data segment; - predicting a future continuation of said most-recent data segment using said at least one curve fitted to said most-recent data segment; - detecting a predefined pattern in said predicted future continuation for predicting occurrence of said predefined pattern, and defining a predicted event time of said predefined pattern, said predicted event time being in the future with respect to said most-recent data segment, and - actuating said stimulus generator for providing a stimulus within a predefined event time window of said predicted event time.L'invention concerne un ensemble comprenant : un ensemble d'enregistrement permettant d'enregistrer un signal associé au cerveau basé sur le temps; un générateur de stimulus permettant de fournir un stimulus, et un ensemble informatique, couplé de manière fonctionnelle audit ensemble d'enregistrement et audit générateur de stimulus, ledit ensemble informatique comprenant : une mémoire permettant de mémoriser au moins un segment de données dudit signal associé au cerveau basé sur le temps pendant l'enregistrement dudit signal associé au cerveau basé sur le temps, et un programme informatique qui, lors de l'exécution sur ledit ensemble informatique, effectue, en temps réel et de manière fonctionnel