TITLE: Probability that my set of dice 'wins'
QUESTION [8 upvotes]: My question is about probabilities. Given are two sets of regular, 6-sided, fair dice of at least one die (but no upper bound on the number of dice). Now, 1 of the sets is considered to be 'the winner'. This is determined with the following method:
Sort both sets on the number of eyes. Compare the dice of both sets 1-by-1 starting at the highest by pairing up the dice from both sets (compare 1st with 1st, 2nd with 2nd etc.). As soon as 1 die is higher than the other, then the respective set is the winner and the other dice are ignored. If both sets have an equal number of dice and all dice are equal, then it's a tie. If it's a tie except that one set still has dice left (is a bigger set), then that set is the winner.
Examples:
A: 6 5 5 (winner)
B: 6 5 4

A: 4 (winner)
B: 1 1 1

A: 6 5 2 2
B: 6 5 2 2
(tie)

A: 6 5 1 (winner)
B: 6 5

Question:
How can I calculate the probability that a certain set wins after you throw all dice, given only the sizes of both sets?
Edit:
The answer can either be a function with 2 inputs, or if this is not possible, an algorithm that calculates this. In practice, the number of dice will be very small (usually smaller than 5).
Edit 2:
Context: These are the rules for resolving a speed roll to determine initiative in a fight between gladiators in the board game called Spartacus. I'm programming a hobby project where I'm simulating such fights and I want to use the probability of either gladiator winning initiative. The probability is used in a Minimax algorithm to generate child positions of the starting position.
Disclaimer: I'm not a mathematician and I have little mathematical knowledge but I do know algebra etc. I'm looking for an answer in the form of an equation with 2 unknowns: sizes of both sets or an algoritm that accepts those inputs

REPLY [2 votes]: Here is an alternate, very rough approximation for large $a,b$.  Another answer establishes that the probability of ties converges to $0$.  Likewise I’d expect that the probability of a tie on just $6$s is also small.  In that case we can just model the difference in the number of sixes as a random variable normally distributed with mean $(a-b)/6$ and variance $5(a+b)/36$.
The probability that this is positive (i.e. that the first player wins by having more 6s) is the same as a standard normal variable being $< (a-b)/\sqrt{5(a+b)}$.  This cumulative distribution can be computed using the erf or erfc function in many programming languages.  But I wouldn’t trust it for single digit values of $a,b$.