computer programs can simulate anything, but has a difficult time simulating “intelligence” or “judgement”
you don’t have to be particularly smart to find out new ways to simulate gameplay. How online games work is that there is communication protocol between a client ( the game ) and the server. all the bot programmer needs to do understand that protocol and replace the game client with the bot program. the communication protocol often includes nearby players, enemies, chat, players positions, etc. heck the bot can even move the mouse to click on buttons and such.
Captchas are also annoying but once the bot programmers know what the questions or images that the capchas are going to ask, they can have a database of checksums and answers to break them a good percentage of times.
the only true way to counter bots is to make them useless to use to begin with. This is the reason why IMC only allowed trading on VIP accounts
or grinding on maps a less effective way to level.