I bought a used (2017) X after comparing the Y and the X. Love it and have no regrets.
Someone feel free to correct me if I'm wrong on any of this...There was AP1, which was what Model X started out with and had until 10/16, when AP2 took over. AP2.5 was released 6/18. AP3 was released 4/19. AP1 was built by Mobileye. Although it still functions well, it does not, and will never, support fully autonomous driving. It cannot be upgraded beyond its current capabilities. AP2 was built in-house by Tesla, uses a slightly lower rez camera suite, and can be upgraded to AP3 and will be able to fully self-drive. AP2.5 uses a higher rez camera suite but cannot perform all the autonomous driving functions but can be upgraded (free) to AP3.