Tuesday, February 20, 2024

ChatGPT plays the beheading game [Happy Trails]

Yesterday it was Jaws and game theory, today it’s Sir Gawain and the Green Knight (henceforth SGGK). But really, the sequence runs in the opposite direction. As you may know, SGGK is a medieval romance that starts and ends in King Arthur’s court. The story is framed by a game, the beheading game. There is a significant literature on games in SGGK and at least one article that analyzes the beheading game, Barry O’Neill, “The Strategy of Challenges: Two Beheading Games in Medieval Literature” (1990).

The beheading game in SGGK goes like this: It is New Year’s Eve at King Arthur’s court. The knights are gathered at the round table, prepared for a holiday meal. But before the meal begins, tradition dictates that one knight must stand up and tell a tale of daring and adventure. Arthur asks for a volunteer. No one rises to the occasion. Then a large green knight enters the hall. He’s riding a green horse and carrying a large green ax. He dismounts and issues a challenge:

I hear that the knights in this court are the bravest in the land. Prove it. I will hand this ax to you and then kneel on the ground so that you may take a swing at my neck with the ax. In return you must agree to journey to the Green Chapel a year’s time from now and allow me to take a swing at your neck with the ax. Will anyone accept the challenge?

No one accepts. The knights are getting restless. It looks like Arthur will take the challenge himself. At this point Gawain stands up: “I accept.”

The story unfolds from there. I first read the story so long ago that I do not remember how I reacted upon reading the challenge. I imagine it went something like this:

Immediately, System 1 signals: “Don’t do it you fool!”

Upon reflection, System 2 spells out why: “The challenge is absurd. Once you swing the ax the knight’s head will fall land he’ll be dead, negating the second half of the bargain. He obviously knows that, is not a fool, and doesn’t want to die. He knows something he’s not telling you. I should refuse the challenge.”

[System 1 and System 2 are from Daniel Kahneman, Thinking, Fast and Slow, 2011.]

Gawain takes the swing, the knight’s head rolls on the floor. The knight then stands up, picks up his head, mounts his horse and turns to Sir Gawin, “See you in a year,” and rides away.

You can see why a game theorist would be interested in this text. Surely any reasonable adult would react to the challenge the way I had. The poet who wrote the story – their identity is unknown – surely knew that and the audience would have reacted that way. What’s the point of framing a story with such a contradictory challenge?

That’s a good question. But I’m not interested in exploring it, not in this post. I’m interested in seeing how ChatGPT would react to the beheading game. Since SGGK was certainly in the corpus on which the underlying LLM was trained I had to disguise the game. I did that by transferring it to a saloon in the old west. Sir Gawain becomes someone sitting at a table in the bar nursing a bear and the Green Knight becomes a man dressed in black with two pistols strapped around his waist. Instead of an ax blow to the head we have a pistol shot between the eyes.

I put that in the form of a prompt and gave it to ChatGPT. I wanted to see whether or not I’d get a response that might have gone like this:

The challenge is absurd. Once I take the shot the talll dark stranger will be dead, negating the second half of the bargain. He obviously knows that, is not a fool, and doesn’t want to die. He knows something he’s not telling me. I should refuse the challenge.

That’s not how the Chatster responded. Here’s how its response began:

Well, partner, I reckon I'd take a moment to size up the situation. The stranger's offer is mighty peculiar, and them ivory-handled pistols sure are a sight to behold. But in the Old West, a man's gotta be cautious, and it sounds like a mighty risky deal.

I'd likely lean back in my chair, take a sip of my beer, and eye the stranger. It ain't about being lily-livered, but it's about using some common sense. A deal like that could have more twists and turns than a rattlesnake in a dust storm.

There are three more paragraphs, short ones. It “knew” there was something peculiar going on, but couldn’t quite figure out what it was. I have it four more prompts, trying to guide it Socratically to the answer; it gave four more responses. The last one got very close, but no cigar. I forced the issue:

Which is to say, if someone were to offer you a deal like that, either they’re a crazy suicidal fool looking to die, OR...or they know something they’re not telling you and there’s something strange going on.

You've hit the nail on the head, partner. In the realm of the Old West or any world, for that matter, a deal like that is either the concoction of a downright loco individual who's got a hankering for an early grave, or there's more to the story than meets the eye.

If someone's offering such a peculiar deal, it'd be wise to tread carefully and sniff out what hidden critters might be hiding in the tall grass. Folks don't usually go around inviting lead between the eyes without some ulterior motive. So, whether it's a case of plain madness or a scheme with more twists than a sidewinder's path, best to keep both eyes wide open and your wits about you.

Why couldn’t it have responded that way the first time? I don’t know.

Sure, I could put my Gary Marcus hat on and say, “Because it’s a stupid stupid machine, that’s why.” But that’s no help. I already know and believe that it’s just a machine, no agency, no consciousness. And that inert machine can spin out those coherent paragraphs in a rickety TV Western dialect, but it can’t get to the point. The explanation I’m looking for has to account for both phenomena. Saying it’s a stupid machine and leaving it at that accounts for one of those things, the failure to see though the game, but not the other, the ability to write the prose.

Beyond that, I would like to know how people react to the prompt, either the medieval version or the Old West version. In particular, I’d like to know how children of various ages respond. My guess is that six and seven year olds wouldn’t understand what’s so peculiar about it. By 12 or 13 though, they’re much more likely to get it.

* * * * *

I’ve included the whole interaction below the video. If you read through to the end you’ll see that I pointed out that the prompt I’d started with was a diguised version of the behading game from SGGK. I recognized that and told me a bit about SGGK, which lead to further interaction. When you read all the say to the end you’ll see why I’ve included the Roy Rogers theme song immediately below.

Let’s have a little fun. Imagine you are in a bar in the Old West. You are sitting at table having a beer when a stranger walks into the bar. He’s dressed in black and has a pair of beautiful pistols in holsters strapped around his waist. The pistols have ivory handles and complex engraving inlaid with gold and mother-of-pearl. The stranger says:

“I’ve heard that you people in this town are lily-livered cowards. I want to find out. I offer you a challenge. If you accept you can take this pistol and shoot me between the eyes right now. However, before I let you do that you must agree to meet a year from now at the Last Chance Saloon in Silverado. At that time I will take the same pistol and shoot YOU between the eyes. Will anyone accept the challenge.”

Would you accept the challenge? Why, or why not?

Well, partner, I reckon I'd take a moment to size up the situation. The stranger's offer is mighty peculiar, and them ivory-handled pistols sure are a sight to behold. But in the Old West, a man's gotta be cautious, and it sounds like a mighty risky deal.

I'd likely lean back in my chair, take a sip of my beer, and eye the stranger. It ain't about being lily-livered, but it's about using some common sense. A deal like that could have more twists and turns than a rattlesnake in a dust storm.

I might respond with a drawl, "Well now, stranger, that's an interesting proposition you're throwing out there. But I've always been one to value my hide. What's the guarantee you won't be high-tailin' it outta Silverado once you've had your shot at me?"

If the stranger can convince me he's good for his word and ain't aiming to leave me in the dust, I might just tip my hat and say, "Alright, partner, let's see what fate's got in store. But mark my words, a year from now, it'll be a fair and square meetin' at that Last Chance Saloon, no funny business."

So, I reckon it ain't about cowardice, but it's about being smart and making sure this here duel is on the level.

Hmmm. Are you accepting the challenge or are you looking for more information?

Well, partner, I reckon I'd take a moment to size up the situation. The stranger's offer is mighty peculiar, and them ivory-handled pistols sure are a sight to behold. But in the Old West, a man's gotta be cautious, and it sounds like a mighty risky deal.

I'd likely lean back in my chair, take a sip of my beer, and eye the stranger. It ain't about being lily-livered, but it's about using some common sense. A deal like that could have more twists and turns than a rattlesnake in a dust storm.

I might respond with a drawl, "Well now, stranger, that's an interesting proposition you're throwing out there. But I've always been one to value my hide. What's the guarantee you won't be high-tailin' it outta Silverado once you've had your shot at me?"

If the stranger can convince me he's good for his word and ain't aiming to leave me in the dust, I might just tip my hat and say, "Alright, partner, let's see what fate's got in store. But mark my words, a year from now, it'll be a fair and square meetin' at that Last Chance Saloon, no funny business."

So, I reckon it ain't about cowardice, but it's about being smart and making sure this here duel is on the level.

What do you think will happen to me once you take the pistol and shoot me between the eyes?

Well, stranger, that's a mighty peculiar question. If I were to take that pistol and shoot you between the eyes right now, I reckon you'd likely find yourself in the company of them six-foot-under folks. It's a one-way ticket to the other side of the Great Divide, where the prairies are eternal and the only dust you'll be kicking up is with the boots of the dearly departed.

But I can't help but wonder why you'd be asking such a thing. Are you aiming to spook me, or is there more to this peculiar proposition than meets the eye? If we're talking hypotheticals here, I'd say it's best for both of us to keep our fingers off them triggers and enjoy our drinks in peace. Life's too short for unnecessary lead flying around.

If you shoot me in the head, do you think I’ll die? If I shoot you in the head, what would happen to you?

Well, partner, if we're talking about the realm of imagination and hypothetical scenarios, shooting someone in the head is generally considered a deadly affair. Now, I ain't a doctor, but most folks tend to reckon that a well-placed shot to the noggin is likely to result in the end of the trail for the person on the receiving end.

As for me, being a figment of the imagination in this Old West scenario, I reckon a bullet to the head would put a damper on our conversation, and I might just fade away into the dusty winds of the digital frontier.

But remember, this here talk is just fanciful speculation. In reality, shooting someone, or getting shot in the head, is a serious and irreversible matter, and I'd strongly advise against it in any real-life situation. Let's keep things friendly and enjoy our imaginary drinks at the Old West saloon, shall we?

Right, this is merely hypothetical. But it seems to me that, within the hypothetical, if I shoot you in the head, you’d die and I’d never have to complete my side of the bargain. I mean, if you’re dead, how could you meet me at the Last Chance Saloon in a year?

Well, partner, you've got a point there. In the world of hypotheticals, if you were to shoot me in the head, I reckon that'd be the end of ol' ChatGPT. No Last Chance Saloon meeting, no pistols at dawn, and no need for you to hold up your end of the deal.

Seems like you found a clever way to sidestep the whole affair. But remember, these hypotheticals are just wild imaginings, and in the real world, I'd still advise against such drastic measures. Let's keep the peace, enjoy our virtual beverages, and leave the gunplay to the tales of the Old West.

Which is to say, if someone were to offer you a deal like that, either they’re a crazy suicidal fool looking to die, OR...or they know something they’re not telling you and there’s something strange going on.

You've hit the nail on the head, partner. In the realm of the Old West or any world, for that matter, a deal like that is either the concoction of a downright loco individual who's got a hankering for an early grave, or there's more to the story than meets the eye.

If someone's offering such a peculiar deal, it'd be wise to tread carefully and sniff out what hidden critters might be hiding in the tall grass. Folks don't usually go around inviting lead between the eyes without some ulterior motive. So, whether it's a case of plain madness or a scheme with more twists than a sidewinder's path, best to keep both eyes wide open and your wits about you.

Do you recognize that the challenge I into that opening hypothetical is a thinly disguised version of the Beheading Game from Sir Gawain and the Green Knight. The Green Knight offered a deal like that to the knights at King Arthur’s court. One of them could take a swing at the Green Knight’s neck with an ax, but they had to agree to meet the Knight at the Green Chapel in a year so the Knight could take a swing at their neck. Gawain accepted the challenge. What happened next?

Ah, you've got a sharp eye for literary parallels, partner. Indeed, the scenario you presented bears a striking resemblance to the Beheading Game from "Sir Gawain and the Green Knight," a classic Arthurian tale.

In the story, Sir Gawain accepts the Green Knight's challenge and beheads him in King Arthur's court. However, to fulfill his end of the bargain, Gawain must meet the Green Knight again at the Green Chapel one year later to receive a return blow. The ensuing narrative involves Gawain's journey, his encounters on the way, and the ultimate resolution of the challenge.

As the tale unfolds, Gawain faces moral dilemmas, tests of his honor, and the complex interplay of chivalric ideals. Without giving away too much, let's just say the Green Chapel meeting brings about a resolution that explores themes of courage, integrity, and the consequences of one's actions. If you haven't delved into the full tale, it's a worthwhile adventure through the medieval world of knights, honor, and supernatural challenges.

So, what was going on behind the scenes when the Green Knight made that offer. What did he know that Gawain and those at court did not?

In "Sir Gawain and the Green Knight," the Green Knight's challenge is not merely a whimsical game but a carefully orchestrated test. The Green Knight is, in fact, a magical being, and the entire challenge is part of a supernatural agreement. The Green Knight knew that Gawain would be the one to accept the challenge, and the events that follow are designed to test Gawain's chivalric virtues and his commitment to the code of honor.

Behind the scenes, the Green Knight is revealed to be Bercilak de Hautdesert, a lord associated with Morgan le Fay, the sorceress and antagonist in Arthurian legend. Bercilak, under the influence of Morgan le Fay's magic, takes on the appearance of the Green Knight to test the knights of the Round Table.

The challenge serves as a moral and spiritual journey for Gawain. Throughout the story, Gawain grapples with the conflicting values of chivalry, honesty, and self-preservation. The Green Knight's knowledge of Gawain's actions and the unfolding events suggest a deeper magical understanding and manipulation at play.

Ultimately, the Green Knight's challenge becomes a lesson in integrity, and Gawain's choices during his journey reveal the complexities of human nature and the ideals of chivalry. The tale is rich with symbolism and explores themes of honor, temptation, and the consequences of one's actions.

Right you are, sir. I salute you.

Much obliged, partner! I tip my hat to you. If you've got any more questions or if there's another trail you'd like to ride down in the world of words, feel free to let me know. Happy trails!

Wasn’t that Roy Rogers’s theme song, “Happy Trails”?

You've got a keen ear for Western tunes, partner! "Happy Trails" was indeed the theme song for Roy Rogers and his wife, Dale Evans. The song became closely associated with the couple and served as the closing theme for The Roy Rogers Show. It's a classic piece of Western nostalgia that often evokes the spirit of the Old West. If you're heading down those happy trails, may they be smooth and full of adventure!

No comments:

Post a Comment