The Story of Hamlet and the Eunuch

David Garrick as Hamlet, hearing what ChatGPT has in mind.

When people talk about using ChatGPT to write your content for you, I don’t think this is what they had in mind. But it sure is fun!

I’ve never been tested for ADHD, but if you asked me I’d say that I have what I’ll dub “rabbit hole ADHD.” That’s when I’m sitting behind the computer trying (claiming?) to work, while there’s a tv show on in the background that I’ve seen enough times that I have the dialogue memorized, when all of a sudden I’ll say, “Hey, that character that just delivered pizza, I wonder if she’s ever been in anything else?” And then it’s off to IMDB I go to see who she is, read her bio, check out her filmography, and generally start reading the trivia pages. Joey’s grandmother mentions Capricorn One, that starred Elliot Gould, who played Ross and Monica’s father? Oh, wow, the woman who played the grandmother played Mother Superior in the 1980s Christmas-themed horror movie Silent Night, Deadly Night. I remember that one! Apparently they wanted to call it Slayride, which is funny because years later professional wrestler Goldberg would star in a similar movie called Santa’s Slay…”

You get the idea. So if that didn’t set your head spinning yet, brace yourself.

Bardfilm and I are talking about the sonnets, and he provides an academic citation for an argument that I like, stating that it “cuts it off at the source.” This leads to a handful of stream of consciousness jokes, and I want to make a eunuch joke so I go do some quick scanning of Antony and Cleopatra to make sure I have my references right. Because while it’s fun to be quick with a joke, you still have to be accurate.

Bardfilm turns our back and forth into a poem. I know that people have been having fun with ChatGPT asking it to write poems, so I ask it to write a poem about eunuchs. I keep trying to catch it off guard. Nope, it gave me a poem. A bad one, but, you know. Still.

I asked it for a limerick instead, and got one. Again, a bad one.

I then asked it if there are any eunuchs in Shakespeare and it not only told me about Mardian in Antony and Cleopatra and Aaron from Titus Andronicus, but also a reference to Dromio Comedy of Errors where it made it a point to comment that that last one’s probably not true, and just a joke. Impressive.

Then I asked where a eunuch might fit in Hamlet. It gave me a dozen ideas:

For example, the eunuch could be a servant in the royal court of Denmark, where the play is set. They could be a confidant or advisor to one of the main characters, such as Hamlet or the king. Alternatively, the eunuch could be a member of a foreign delegation or embassy, visiting Denmark and bringing news from the outside world.

How far can we push this thing? I asked it, “can you write a scene between Gertrude and a eunuch envoy from Norway?” and it said sure, no problem, and gave me one. Then I said, “now add polonius.” And it did. This thing never blinks. I have yet to get a “I have no idea what you just asked me” or “I don’t know how to do that” response. A lot of “I understand what you asked for and I can’t do that” but never a “I don’t know what you said”.

Ready for the scene it wrote, now featuring Polonius? Here you go!

Gertrude: Welcome to Denmark, honorable envoy. How may I assist you?

Eunuch: Your majesty, I am here on behalf of the king of Norway. He has heard of the recent events in your kingdom and wishes to offer his condolences.

Gertrude: That is kind of him. Please convey my thanks to your king.

Eunuch: I will do so, your majesty. However, there is also a matter of great importance that I must discuss with you.

Gertrude: And what is that?

Eunuch: The king of Norway has received a proposal of marriage from your son, Prince Hamlet. He wishes to know your opinion on the matter.

Polonius: Your majesty, if I may interject. I believe this is a matter that requires careful consideration. Prince Hamlet has been acting very strangely lately, and we must ensure that any decisions made are in the best interests of the kingdom.

Gertrude: Thank you, Lord Polonius. I will take your advice under consideration.

Eunuch: I understand, your majesty. The king of Norway is aware of Prince Hamlet’s reputation and does not wish to cause any trouble. He simply wants to know if the marriage proposal should be considered.

Gertrude: I will discuss the matter with my advisors and the prince himself. Thank you for bringing this to my attention.

Eunuch: Of course, your majesty. I will await your response.

Gertrude: Thank you, envoy. You may take your leave.

Eunuch: Thank you, your majesty. I will return with your answer in due time.

Polonius: I will make sure to inform the prince of this development and advise him accordingly.

Gertrude: Thank you, Lord Polonius. Let us hope that this matter can be resolved peacefully.

King of a Romeo and Juliet “unite the warring families” sort of ending, if you ask me!

ChatGPT: Somebody Call Alan Turing

One of the very first programs I “wrote”, and by that I mean “copied by hand from a book”, was a BASIC version of ELIZA, the famous “chat” program by Joseph Weisenbaum. I was a kid, just learning to program, and this sent me down a spiral into the history of artificial intelligence where I learned about the Turing Test, created by Alan Turing in 1950, which says, simplified, that the goal of natural language processing is to create a chat program such that, if a person is sitting at the other end, that person can’t tell if they’re talking to a human or a computer.

Well, it’s been 70+ years at this point and man are we getting close. There’ve been a million chat programs and competitions since then, I’ve played with a lot of them, and they’ve all been quite terrible. In fact if you’re trying to break one – after all it is a test, not a game – it’s usually pretty easy. But if you’re not? If you honestly just want the content that comes from a conversation, with back and forth question and answer? Wait’ll you get a load of ChatGPT.

As I always do, I just walked up and started hitting it with Shakespeare questions. I wasn’t trying to trick it, I was just asking what I thought might be interesting exploration of what it could be expected to do. What follows is unedited transcript.

I started out with an easy one. And I got back an easy response. It’s probably not copied from Wikipedia, but it reads like it could have been. I didn’t expect much.

That was kind of cool. I not only got an answer, I got a reasonable and grammatically correct answer. Often in the older versions of these chat engines, trying to express something in a different way meant just doing some dumb word swapping. This one’s maybe doing a little of that (“tragic” = “very sad”) but it does a lot more than swap out words.

Ok, let’s make it a little more challenging.

Fascinating. Again, like the first question it feels very Wikipedia-like. But it’s serving these answers up in a matter of seconds. And it’s not like this things got a database of what people might ask. I’m relatively certain I’m one of the few people drilling down on random Shakespeare combinations.

I don’t know what I expected here, but I like this answer. It implies strongly that this thing understood my question, understands not only the characters of Hamlet but the elements of tragedy and comedy, and makes a valiant attempt to offer suggestions about how they might fit together.

Ok, two more then I want to go back and play with it some more.

I don’t know why people keep getting so excited about using this thing to generate original content – it’s not going to offer opinions, and it knows when that’s what you’re asking. So this heavily suggests that all we can ever really get out of it (well, for now) is factual responses.

This is basically the same question, yes. But do you see why I left it in here? It literally tells me, “You just asked me the same question in a different way.” So not only is it doing a ridiculously impressive job answering the questions, but it’s keeping your conversation in context and using that as part of the answer.

I wasn’t terribly impressed by the art generators that were all the rage a few months ago. This, on the other hand. I could talk to this thing all day.

Pick Your Favorite Ophelia

https://www.thecollector.com/shakespeares-ophelia-art/

When I saw the headline “9 Artistic Representations of Shakespeare’s Ophelia” I thought immediately of Millais’ Ophelia in the river. But what else? I remember a variety of Juliets and Mirandas and Ladies Macbeth, but I couldn’t remember how many interpretations of Ophelia I’d seen.

Well here we have 9 of them, and yes Millais is the first “iconic” one to get that out of the way. I’m a little weirded out that so many of them are artistically naked. Not only have I never thought of Ophelia that way (I tend to think of her as very young), but it does kind of go against that whole “her garments, heavy with their drink…” thing. This is mentioned in the article.

Pretty sure I’d seen #5 before. Never #2, #2 is creepy.

I think #7 is my favorite. How about you?

The Rosaline Trailer is … Actually Good?

I’ve been dumping all over the YA book (now movie) Rosaline that tells us the story of Romeo and Juliet from Rosaline’s point of view. You know, that character mentioned once that plays no significant role in the play. So the idea of retelling R&J really means, just making up a whole new story. Maybe if we’re lucky we get a new Rosencrantz and Guildenstern Are Dead, but I wasn’t holding out hope. There aren’t that many Tom Stoppards out there.

Well the trailer’s out and … I like it? It looks like it’s got legs to stand on its own (unlike, say, the wretched Ophelia that I couldn’t even finish).

It’s reminiscent of that heyday of high school Shakespeare comedies when we got 10 Things I Hate About You, and She’s The Man. It’s got the pacing, it’s got the humor. I laughed at a few bits. Strangely adult, for what it is (who says “blow me” in a PG-13 trailer?) but maybe that’s just where the bar is set these days.

Anyway, I’m more optimistic than I have been. Now that we see what it’s trying to be, I look forward to seeing the finished product. And I guess it’s a Hulu thing now? Which is good, I won’t have to get myself to the theatre to see it!

We Are Not All Alone Unhappy

Being a computer scientist and a Shakespeare geek is a little weird sometimes. For as long as I can remember, I’ve seen Shakespeare’s work – and, by extension, his universe – as a structured body of text to be manipulated however I am able. When you have the ability to code at your fingers, structured data is your playground. All you see is, “Plays have scenes, scenes have dialogue, dialogue has lines that are spoken by speakers…” and then you build it back up from there.

How could we ever see Lady Macbeth with anybody else?

People usually go one of two routes with this knowledge. First, they run word analysis and try to come up with reasons why Shakespeare liked to use “dark” words earlier in his career or how often he used synonyms for love. Stuff like that.

Or, according to the new AI world where everything is “machine learning”, they “train” a model on how Shakespeare wrote, and then they generate fresh new content “in the style of Shakespeare.” I always hate these because “in the style of Shakespeare” can be said with fewer words as, “not Shakespeare.”

I’ve always looked at it differently. I see characters and how they relate to each other. In my dream world, where I’m a younger man with more time and energy to work on projects that have no monetary value but are infinitely fascinating to me, I want to read the text of a play in such a way that each character turns into a chatbot, and the user can do stuff like walk through Romeo and Juliet from different character perspectives, stopping to talk to each character. “Ask TYBALT why he hates ROMEO.” Stuff like that. I think that would be awesome. I’ve often thought of how far I could really take it. I’ve just never written it.

Of course, once you get into interacting with the story, you have to start creating new content. Shakespeare and “interactive fiction” is not new. The name Ryan North might be best known – he actually published a “choose your own adventure” version of Hamlet. But it’s a much smaller universe than either books or games. You basically get to work with people who were looking for you already. It’s a match made in heaven.

So I’m a bit giddy to have found the interactive Twine game. We Are Not All Alone Unhappy sitting in an article about newly published SF inspired by Shakespeare. This one’s a little different. It’s not a book. It’s a small game where you pick two Shakespeare characters (from a pre-chosen list of nine) and see if they get a “happy ending.” Who decides that? Well, the author does – Cat Manning. And the math geeks may jump right to the numbers and realize there are only 72 possible combinations to run through. But each of those combinations is a spin on “what happens when you put these two characters in a room”, so that’s 72 pages of original Shakespeare-related content, and that’s what we’re here for.

There is a game and a goal. Each character has empty hearts next to their name. Find them a happy ending. You fill a heart. The goal is to fill all the hearts. There are 28 hearts and 72 combinations, so you won’t play for too long before stumbling across the good matches. Nobody said it’s a difficult game. But those of us who have personal relationships with Shakespeare’s characters will have that much more fun saying, “Oh, I wonder what would happen if I put Mercutio and Kate in a room together?”

I’m also finding that I disagree with some of the results 🙂 and wish they were longer. Some are real dead ends. Some are a little softcore, so reader beware. But if you’re always on the lookout for interesting and slightly geeky new ways to play with Shakespeare content, it’s definitely worth playing with.

https://borrowers-ojs-azsu.tdl.org/borrowers/article/view/342/607