https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5306232/Chickens are not smart. They get out and then have no clue how to get back in by using the same way they got out through. However, as like many other animals and humans they can be channeled, not taught, by the known Pavlov operant conditioning.
Evidence: Ivan Petrovich Pavlov (1849–1936) The same study that he did with a dog, I have done with my girls since they went out to their own coop at about 12 wks. They love oats. However, I began to give them oats only if they were up in the roost before night time. I also did not allowed for them to go over any other to get oats. After a few eeks of everyday of the same thing, they all came to the roost to get the oats and they do pretty good at not jumping anyone, nor pecking and to wait until I came to them. I was really not into a training mode but more to make it easier for me. However, the see me in the evenings with a mason jar and all I have to do is hit softly with my nail in teh can top and they all come and I walk into teh coop and they are all crazy to get in teh roost because they have learned that only there is where they get oats. Scratch and everything else is in their bowls but oats, they have to be in the roost. Darn, it is hard being a teacher and stop teaching,lol