Now I have 3 different AIs (and a level selector!) each AI is a single difficult level.
Level 1: Completely random moves. It just searches for all possible moves and then picks one of them at random. This is still pretty stupid but at least it is better than always picking the same move method of the previous iteration. This should be pretty easy to beat for anyone.
Level 2: Conditional random moves. It still picks up random moves but only those that are not completely terrible. This mostly means that it will always either move a single space (so no jump) or will jump if it can capture at least one enemy position. Other than that, it will still do pretty bad moves as it will pick the first move it can find that satisfies the conditions even if there is a better one. Still should be pretty easy to beat but it is definitely harder than the purely random one.
Level 3: Scored moves. This is where things start to get really challenging. Now the AI looks at all possible moves, scores them and picks the best scored one to do (or randomly one of several with the highest score). The score is currently based on several variables that i will not mention now to not spoil the fun, but this should give a pretty good challenge even for experienced players.
I intend to try to add one other level where it will also look on possible counter moves and factor that out in the scoring. The idea is that it would not do a move that looks pretty good in itself but results in possible counter-move that would erase any gains.
Other than that, ideally I would implement some version of a Monte Carlo search or MinMax but that would mean using recursion and I am already using most of the available memory for other things. I might try to implement it anyway but I suspect that if it works, it will be severely limited in how many levels of recursion I can use). Doing this would allow the AI to pick the best move not only based on the current board state but also based on future possible moves.
Still, before doing the above, I will clean everything up and put it in a shipping state. Hexxagon itself will also need some changes not present in the current version.