I have scheduled a dramatic reading of Shakespeare’s Julius Caesar with a small group of friends. The play has 46 speaking roles, but I expect only about 5 people at the reading and decided to try to divide up the roles equitably between my small cast. Goals:
- Evenly distributed number of lines between the actors.
- Try not to have the readers performing dialog with themselves.
I extracted character, linecount and who-speaks-to-whom information about the play from the gutenburg project text version, which was very well formatted and made it quite easy. Here is the line count information for each of the 46 named speaking characters in the play. Note the names of the characters vary between versions: i.e. FIRST COMMONER = CARPENTER and SECOND COMMONER = COBBLER in different editions.
An equitable distribution for 5 characters would be ~500 lines per piece, since Brutus alone as 700 lines, he will always be the star in a 5 person performance.
Turns out the optimal solution is non trivial, being 5^46 total number of combinations, can’t test them all. However, it looks like I can defer the correct solution for now, since a greedy algorithm which takes each character in the play in the order of the most lines and assigns them to an actor with a cost function that attempts to distribute the lines evenly with a heavy penalty for talking to yourself seems to work well. With only 5 actors the whole play can be performed with someone talking to themselves only 3 times (not bad since I actually had to do that on stage in a play in 5th grade, much to the amusement of the crowd). The line distribution is fairly equitable for the non-Brutus and non-CASSIUS characters.
Fortunately, we are unlikely to read the whole play, so I will divide up the play for only the first three acts and see what happens, for these three acts there is one case of an actor delivering a line back-to-back with another character they are playing and the total cast is reduced to 27 characters.
The good news is if someone calls in sick or we have surprise guests, I can easily re-allocate the roles. Not optimal, but passable for this event.