They were connected by a computer transmission and electrodes and learned the proper response necessary to match the stimulus thus providing them the reward of praise. Sounds like operant conditioning.
Operant conditioning focuses on using either reinforcement or punishment to increase or decrease a behavior. Through this process, an association is formed between the behavior and the consequences for that behavior. For example, imagine that a trainer is trying to teach a dog to fetch a ball. When the dog successful chases and picks up the ball, the dog receives praise as a reward. When the animal fails to retrieve the ball, the trainer withholds the praise. Eventually, the dog forms an association between his behavior of fetching the ball and receiving the desired reward.
I have done experiments with direct brain to brain communication, testing the effect of frequency changes. The “Tower of Babel” concept does work as when you tune high enough you pick up on the thought that formed the language and bypass the difference of language barriers.