Original Post
I would like for you to review my plan to build a probabilistic bot. Details below.
---------------------------------------------------------------
First we have two variables, the defenceco and attackco. They are how heighly the bot considers defending and attacking. The defenceco variable would be affected by the remaining health (and armer) of the bot. The attackco would be affected by the remaining ammunition, and weponary of the bot.
The bot would make its decisions based on tokens, things like [aiming30] or [wall10] or [enemy20]. Those affect each of the probabilities of the output actions, like [enemy20] would increase the probability of [move20] or [Rsidestep].
It also has a small rule base, such as
if [enemy20] and [aiming20] then fireprop = fireprop * 2
or
if [safe20] and [enemy100] then mleftprop = mleftprop * 6
The rulebase would only allow each rule to be fired once.
once the rulebase is finished looping, the probabilities of each action (sidestepping, firing, moving forwards/backwards, ect) are assessed and a proportional random number generator is used to select the action. to calculate the final probability, you use the formula:
frob = oprob * (attackco * aatk) * (defco * deftk) Where frob = Final probability, oprob = old probability, aatk = the how "attacking" this move is, and deftk = how "defending" this move is.Is this idea a good one? Please comment!