What could the motivators for my game’s AI be? Could I take the easy road and ape the player, or do a full one move analysis? This one line game is not the same as SeTT almost at all, so pattern matching is out. Plus there are more move options to handle. Not a walk in the park.
Anyhow, this evening, I managed to put in all the specced game functions (move variations) with little pain. I got rid of the humongous collisions function, and the compare collisions function, and the convert abc to 123 function. 2 days’ of time wasted all for nothing.
Then I added some lines of code to the movePlayer function and all’s well. Tonight, a do or die finish. I cloned movePlayer into moveAI, and added a conditional analysis block for the board / line scan of pieces on play / docked.
I’m thinking that m(ove), s(plit), and j(oin) can be used if:
A player’s pod or fragment is spotted near midway. Then count spaces to see who touches who first and who is higher value.
More pods and pieces need to be launched if player’s fleet breaks thru midway. Essentially defend.
Counterattack. Find those weak places in player’s fragments and pods.
Launch > Spot > Counterattack > Defend > Launch…. would be the algorithm loop.
...
I have the algorithm roughly put in and will test it tomorrow. Play some sample games. It might be a longer process than SeTT. Think I will wrap the conditions in a loop of some kind.
Liew forces surrendered so I believe. Then we showed everyone east and west why the mind is not used like the Liew 6 used it. Telepathy, even glancing onto you, is dangerous. Don't make enemies in the mind. Witness my parents and sister.
Almost midnight and the algorithms for AI shallow but wide thinking are in place. It doesn’t use a tree because I haven’t figured those out yet. Just a silly game, made for fun, doing what comes naturally.
...
Unexpectedly I had quite a bit of work to do on the AI indices vs the Player indices I did the day before without much difficulty. Reversing them for AI moves proved tricky. All the + became - and the : switched positions. I must be dyslexic because it really hit the wall, what with the Liew witches smothering me.
After that was settled, I began to build a competent AI move selector, all the moves having been coded in earlier. I am KISS so Frag will not be grandmaster grade, at least not my version of it. It will be PD (public domain) for v.0.0.1b and maybe not when it hits a v.1.0.
Just chilling this afternoon and coding sporadically. Can't wait to do the review of my FiiO ff1 buds. Just know they're gonna be good.
No comments:
Post a Comment