On the other hands many dinosaurs had brains the size of a walnut - so its all open to speculation.
Did you know the Stegosaurus had a second brain in it's ***? This supposedly is where it's long term memory was located...
Of course, this may be a fabrication by TV Land, as I got the information from the character of Walter Bishop from Fringe. The long term memory thing is more likely fabricated than the other part, but still plausible.
I like to think that a typical Hydra (the kind that regrows it's heads) has a system similar to something from a more future work. From Schlock Mercenary, we have Retro-Exocephaloderm Nannies, a fancy word for "Robots that back your brain up in your skin". Let's say a hydra has an organic way of doing the same thing, either into the skin or an extra brain in it's ***. It's unable to do any thinking with it's skin, but all it's memories, personality, recent decisions, recent smells sights and sounds, etc. are in it's skin. So when it loses it's brain(s), it "restores it's [hard drive and RAM] from [backup], [while manufacturing a new identical motherboard]". It's automatic systems are able to do this, even when it has no brains left, so while the hydra is completely headless, it's unable to act in any way (As seen on Disney's Hercules movie), but it will soon regrow it's heads and they'll immediately start taking action. Including getting it's heart pumping again, as that (and likely other internal organ(s)) is likely to shut down after a brief period of no control. Which is why preventing the head from regrowing long enough will permanently kill a hydra.
Now, the way I see it, a hydra has multiple heads, therefor brains. It only has one hide. It has to back-up all the brains in this one skin, and so it either has to make certain areas different, which means that most of the brains restored from backup will be severely corrupted and inoperable; it has to overwrite backups from one brain with another over and over in a cycle, which will leave most brains un-backed up; or it will have to create a combined backup, with conflicting memories and duplicate sensory inputs. I believe the third takes place. When a head regrows, it will then be very disoriented by the various sensory inputs being restored from back-up, and the more heads sending sensory information to back up the more disoriented the new head(s) will be. They eventually sort those out, and once fully restored from backup they only use their own senses (no need for all eyes to send information to all heads, etc., and same with sound and taste/smell, though touch would be shared, and all heads would respond to a piercing by a sword). It almost immediately starts having it's own memories, but having multiple memories time stamped with the same time would be a bit confusing, and it would start subconsiously weeding out memories that seem similar from similar times, eventually arriving at it's own non-conflicting set of memories; The older the hydra, and the more heads it has/had the longer this process will take. Once it's senses are straightened out and it's memories pruned (if all the heads with a certain memory are destroyed (like eating a poisonous fruit), and all the new heads prune out that memory by chance, it's likely permanently lost (so it doesn't know the fruit's toxic anymore)), the new head will no longer be so disoriented. It's own new memories will start being backed up as well as the other heads' memories.
The fact that each head will have it's own set of old memories and new memories will probably mean that each will develop different personalities, and the overall case of multiple personality syndrome will only get worse as time wears on and heads regrow. This means a newly hatched hydra is probably the sanest, most intelligent hydra you will ever be able to find. This also leads into my theory of HOW A HYDRA BODY IS CONTROLLED, the relevant point of my rant to the discussion.
As each head has a different personality, as a result of their conflicting memories, and each is likely to be lost at any time (it's possible that hydra heads actually age and die quicker than the body, and rot and fall off periodically), it's necessary for each to have an equal chance at controlling the whole body past it's own neck. The only way for one to control the body is basically to "outwill" the others, and to become the dominant head. It will remember how to do it, as it's memories are backed up, but when a head becomes dominant, it's like "Remembering to ride a bike after five or six years", and not every head will be as good at coordinating the body as the others.
Since every head will remember controlling the body at some point or another, each head will want to control it. So they will constantly try to outwill the dominant head, or eliminate it. You've heard that the heads of a hydra will snap at each other, and fight with each other? Yeah, that's one head trying to sever the dominant head so it can take control of the body. Of course, once a head that's not controlled the body for a long time gets control, the body itself will seem a little disoriented as the new personality gets used to it. But control won't last for long, as another head will outwill it or sever it soon, which also explains why a creature with such powerful limbs walks so slow and never runs: it can't make up it's mind where to go for long and it can't remember how to walk for very long at a time.