This piqued my curiosity so I dug into it a bit on Wikipedia. Most worms are dumb as fuck, roundworms are about as dumb as they come with total neuron counts for a roundworm being comparable to a microscopic tartigrade (300 vs 200). Most of this is located in the head of the worm in a brain like structure though, so I'm betting the clones develop their brains independently with no information transfer. I doubt there's a ton of learning/memory forming going on at all though, based on how simple worms are, so it's probably functionally identical. I would be surprised if most worm species exhibit any kind of learned behaviors ever.