Beliefs, plans, and perceived intentions in dynamic games