It's spinal condition,mainly causes pain and stiffness from neck to lower back.Your Physiotherapist can help you better in coping activities of daily living through proper postural care,Taping/bracing,exercises,positional traction and sports.Hope it helps!
Firstly, you should be aware that AS is a progessive disease and it can worsen with time/age if you are not taking it seriously and correcting your habits of movement/positioning early on with AS can help maintain your long-term mobility and health.
The goals for treating ankylosis spondylitis are to reduce pain and stiffness, maintain a good posture, prevent deformity, and helps you to perform ADLs(Activities Of Daily Living) normally.
As described below swimming is very good exercise for this. Moreover, stretching/strengthening exercises for spine are also good.
My sincere advise is that you should consult a good physical therapist for proper exercise plan.