Guys, What does a mean when a guy suddenly changes his behavior towards you?

I see this guy during my daily walks. He was staring at me while I was not looking. I could always feel him looking at me. Several times I also caught him looking at me out the corner of his eyes, looking back at me once he would walk past me. Once I started noticing this, I started looking back at him as well, we would both stared at each other and make eye contact, he would smile at me, I would smile back. I started to say hello to try to initiate a conversation with him, he responded the first time and smiled. Next day, I say hi to him again, he barely answers then looks down. This went on for a few days. I see him again , he went out of his way to say hi to a girl walking in front of me, very loudly , in a very obvious way for me to look up and pay attention, then walks by me and ignores me. Now, he won’t even look my way. I do like him and thought he liked me too. He’s behavior is very confusing and I thought was kind of childish. Then I thought he may be the shy type?
I have always dealt with confident males, which who I’m always attracted to ….
Move on or try to talk to him again?
Guys, What does a mean when a guy suddenly changes his behavior towards you?
Post Opinion