I need a simple algorithm to calculate the outcome of two differently sized armies battling.
Each army has 1-100 troops and every troop is the same value on the battlefield. The troops do not have individual stats. The only parameter on each army is the number of troops. For example: A with 57 troops battles B with 89 troops. Who wins?
Randomness can be a factor: For example, there could be a 50% chance that team A's total is subtracted by half of team B's total. Here's what I have so far (in a variation of BASIC):
lbl 1
If A>B goto2
If A<(or equal to)B goto3
lbl 2
50% chance B-((A-B)/2)→B
50% chance A-(B/2)→A
goto4
lbl 3
50% chance A-((B-A-/2)→A
50% chance B-(A/2)→B
goto4
lbl 4
If A=0:stop
If B=0:stop
goto1
So this system repeats until one of the armies reaches 0 troops.
The problem is, the battles go too fast. The battle is done almost instantly sometimes. Is there a better algorithm?