An adaptive cardiac resynchronization therapy system delivers biventricular stimulation to the heart with dynamic AV delay and VV interval. The stimulation is modified continuously in correlation with the hemodynamic performance of the heart. The system uses a spiking neural network comprising spike controller (42) that learns to associate the VA interval based on hemodynamic sensor temporal patterns. The associated VA interval replaces the sensed atrial event signal during atrial fibrillation episodes.