<human>: I [f/17] been dating a guy [m/17] for a few months. We're great for a week (texting all night, meeting up to hang out, everything being all-around peachy), but then we either don't talk at all for the next week or when we do, he sort of gives me the cold shoulder.

Usually he initiates contact. Sometimes I do, but if I notice I've been the one to do so like 3+ times in a row, I make a conscious effort not to for a little while.

I'm very aware of the clingy/obsessive girlfriend stereotype from every man's nightmare so I purposely try to avoid doing that. Whenever he stops texting me/asking to hang out for a period of time, I try not to text him in order to give him space. He usually comes around after a while and we're back to being great again.
This used to be a big issue because it'd literally be 2 days of cloud 9 and then 2 weeks of coldness. The only weird thing is a few times he questioned me why I never pursued him when he didn't talk to me for a while. That made me realize that maybe he knows what he's doing--he's purposely doing the hot then cold dance in order to see how I'll react. He said that the fact that I didn't seem to be frustrated whenever he stopped talking to me (I actually was, but I didn't express it to him) made it seem like I didn't like him that much/care as much about our relationship as he did. <<his words
So I'm wondering, men, if you think I did the right thing? In the future should I continue giving him space when he does his cold act again? I feel like if I give him space, he'll stay interested and not think I'm easy/annoying, but I also don't want him to think I don't care. So would it be better to just give him the reaction he wants and ask him why he suddenly stopped talking to me again?

Can you provide a brief overview of the text?
<bot>: Boyfriend is hot/cold. I give him space. He gets frustrated by that. Should I change my methods?