AKs seem to have come a long way in recent years. You can get a high end DDI AK for what you'd pay for a lower end AR. Some of the magpul furniture and other upgrades make mounting optics pretty easy. Plus you can still get quality ammo for around $220 for 1000 rounds.
If I was in the market for a semi auto, I'd take a good look at the AK.
That being said, I'd choose an AR. They are like adult Legos with all of your options to change out parts and make upgrades, or even build your own.
I have both. The AR's I think are just more refined, smoother. The AK's are rock solid, not fancy, not pretty, but work very well. Simple design that has held up as you can see by their use world wide. I bought mine years ago and paid less than $360. Was well worth it too. (Did have trigger slap but I fixed that)All that said I would buy the AR if I could only buy one of the two.