Really, I don't think it actually is random. He has made a mistake or has made it purposefully more difficult, on the first level, I had 12 troops on my front line and 10 countries, he had 4. he reinforced his country to 7 then trounced 24 troops and followed through everywhere else so I had 3 countries even though only one troop is meant to be sent through, I then used my remaining 12 to get countries back, on first attempt I lost 8, I try somewhere else and lose 3. Then he beats me next turn. Fix the random engine it can't be correct
If you have two fully upgraded castles (I think, it might work with less) and send troops between them repeatedly, your troop numbers rise very quickly. Which I think is because when they move into allied castles they are worth their strength but when leaving they are worth 1.
Fixed in newer versions