Create adaptive.py