Touhou Project by Shanghai Team Alice

Knights and knaves accredited to Raymond Smullyan


In the sealed, secret world of Gensokyo, a shocking change has overtaken the land and its people. Through the application of a forbidden template, all of the inhabitants have now found themselves either unable to lie, or unable to tell the truth.

All of this was the result of one Yukari Yakumo, the Youkai Sage, reading a certain book of logical exploits by one Raymond Smullyan.

Now, an inhabitant who finds him- or herself unable to lie is called a knight, and an inhabitant who finds him- or herself unable to tell the truth a knave.

Remilia Scarlet, the Scarlet Devil, has awoken this night to find herself unable to lie, and therefore a knight. She has also discovered that her faithful servant Sakuya Izayoi, the Dangerous Illusionist, is a knave, who always lie.

It seems that it is up to Remilia to solve this incident, to return lies and truth to equal distribution amongst Gensokyo's inhabitants.

This afternoon, Remilia and Sakuya have traveled to the domain of the kappa to find out what mischief they may be causing.


Knights and Knaves:

A Logical Adventure of Gensokyo

by Wyrm

Chapter 4:

In Which Remilia Scarlet Seeks the Kappa King


Nitori's Toolchests

Although is was growing late in the day, the sun was still too strong for a vampire to survive for long in it. The position of the sun made flying a hazard, as she found positioning her parasol to be interfering with her seeing where she was going. It was then she decided to land, as the forest was quite dense around the river here, and anyway they were nearing the kappa lands.

Without their aerial viewpoint, the two found the only guide to be the river itself. It was a muggy place, filled with bugs and dampness and mud and algal scum and a dozen other nasty things besides.

"Aigh! This is thoroughly unpleasant!" exclaimed the vampire knight. "My poor shoes and socks are caked and muddy and squishy!"

Sakuya sighed behind her. "I never wanted these shoes anyway," she murmured, glancing at a pair of patent leather shoes that were in no way built for trooping through mud.

A few minutes later, the knavish maid perked up. "M'lady, I hear no singing voices!" she declared with a lie.

Remilia strained her ears, and soon she could hear it too.

"Kappappa, kappappa, Ni~tori~!"

It was none other than one Nitori Kawashiro, the Aquatic Engineer. The two hurried toward the voice, and came upon her slender form, dressed as she was in aqua dress lined with pockets, matching galoshes and spinach-green cap, dancing along the swampy shore.

"Get more than you paid for with Ni~tori~!" the kappa sang. She caught sight of her two visitors and let out a faux surprised gasp. "Oh, hello! You must be the vampire child knight and her knavish maid!"

"I see that our reputation precedes us."

Nitori gave a small nod. "It does indeed, and I know you know I'm a knight, so we can dispense with the 'determine my type' logical puzzle pleasantries that seem to be the norm these days."

"Thank you. It gets tiring having to solve logical puzzles at every encounter. I miss the days when a greeting meant a danmaku fight," the vampire said wearily.

"It's only the second day of the incident."

"I know. I like a good puzzle occasionally, but lately it's been puzzle after puzzle after yet another fucking puzzle."

Nitori shrugged her off with a smile. "I'm afraid that the puzzles aren't going to stop for the foreseeable future," she cautioned.

"True," Remilia sighed. "Anyway, Momiji told me to see the Kappa King."

The ocean-haired kappa straightened to attention at the mention of the Kappa King.

Remilia stood up, slamming her hands on the table. "Ah, so you do know about the Kappa King!" she said in eagerness.

Nitori shrugged. "I do," she admitted, "but I'm under no obligation to tell you anything about the king."

Remilia snarled, leaping forward to roughly gather up the kappa by the scruff of her jacket's neck. "Tell me about the Kappa King, you waterlogged reptile!" the annoyed vampire snarled.

"Ah, Ah, Ah!" the kappa tsk'ed, "Only I have the ear of the Kappa King, if one exists! If you harm me, I guarantee that you will never be in the king's good graces."

Remilia's eye twitched in annoyance. She then let go of Nitori's jacket, releasing her. Nitori spent some moments smoothing out her clothes. "That's better. Now, I was going to give you a few leads to the Kappa King, but I'm afraid your behavior has put me in a bad mood, so you'll have to earn those leads. I think you know what that means." A mischievous gleam glinted in the kappa's eye.

Remilia slumped. "More logic puzzles..." she murmured unlifelessly.

"Correct. Follow me."

21. The First Set

Nitori lead the two to a room with three toolchests, one made of iron, one of copper, one of lead.

"I have hidden a single spanner inside one of these toolchests, each of which has been inscribed by the hand of a skilled kappa of Gensokyo," began Nitori.

"Which hand?" asked Remilia.

"Ah, that's for you to decide, for each chest!" countered Nitori, "If you can choose a toolchest that does not have the spanner inside it, then I will reveal one and only one fact about the Kappa King."

Remilia stepped up to the toolchests and read their inscriptions.

The iron toolchest bore this inscription: The spanner is in this toolchest.

The copper toolchest bore this one: The spanner is not in here.

The lead toolchest bore this inscription: At most one of these three toolchests was inscribed by a knighted hand.

Even if she chose by chance, Remilia had 2/3 chance of choosing one without the spanner, but Remilia, of course, chose the one that had absolutely no chance of containing the spanner.

Solution: Suppose the inscription on the lead toolchest is inscribed by the kappa's knighted hand. Then it is true, so the two remaining chests are inscribed by the kappa's knaved hand and are false. The iron chest claims the spanner is in that toolchest, so it doesn't contain the spanner. The copper toolchest claims it does not contain the spanner, and so contains the spanner.

Suppose on the other hand the inscription on the lead toolchest is inscribed by the kappa's knaved hand. Then it is false, so there are at least two chests inscribed by the knighted hand and are thus true. The iron chest claims the spanner is in that toolchest, so there it is, while the copper chest claims otherwise and so is not there.

In either case, the spanner is not in the lead toolchest, so Remilia chose that one.

22. The Second Set

Remilia opened her chosen toolchest to find no spanner. Nitori smiled and opened the other two toolchests, where a bronzed spanner lay in one of them. "Very good! The first fact is that, should she exist, the Kappa King is female."

Remilia frowned. "Given the preponderance of female youkai, this doesn't tell me much."

"What did you expect from such a simple challenge?" Nitori asked rhetorically. "Let us move on to the next challenge, where you will obtain upon success one and only one fact, a more valuable fact, about the Kappa King."

This time, Nitori lead them to another room containing only two toolchests this time, iron and copper. "As before, each inscription was done by the skilled hand of a kappa, but not the same hand did all of the inscriptions," the kappa informed. "This time, you must find the toolchest with the screwdriver inside it."

The iron toolchest bore the words: The screwdriver is not in here.

The copper toolchest bore the words: Exactly one of these two toolchests was inscribed by a knighted hand.

If Remilia chose by chance, the odds were exactly even that she would find the screwdriver. But she chose not by chance but by logic, and thus her chance of success was 100%.

Solution: If the copper toolchest is done by a knighted hand, then it is true and only one inscription is done by a knighted hand, which is the inscription on the copper chest. Therefore, the iron chest must have been done by a knaved hand. If the copper toolchest is done by a knaved hand, then it is false and either both are inscribed by knighted hands or they are both by knaved hands, and since the former is impossible, it must be the latter. Both inscriptions are done by knaved hands, and in particular the iron toolchest's inscription was done by a knaved hand. In both cases, the iron chest has been done by a knaved hand, and is therefore false. The screwdriver is in the iron chest, which is the one Remilia chose.

23. The Final Set

Remilia triumphantly opened her toolchest to find a gold-plated screwdriver within.

"Very good!" the kappa congratulated, throwing open the other toolchest to reveal that it was empty. "As promised, the fact: should she exist, the King wears a small crown on her head. However, it will not be easy to spot, given that she habitually wears it underneath her cap."

Remilia crossed her arms. "I have a feeling that capped kappa are quite common, so I don't expect it to be very useful."

"Caps are quite popular amongst the kappa," conceded Nitori. "Well then, we shall move onto the final challenge, where upon your success I shall reveal the most valuable of the facts I have to tell about the Kappa King."

Remilia crossed her arms and took on a steel edge. "I am ready."

Nitori lead them to a third room, containing three toolchests: iron, copper and lead. This time, however, each toolchest had two inscriptions on them, labeled (1) and (2).

"As before, each inscription was done individually by the skilled hand of a kappa. However, no toolchest has more than one inscription that was done by a knaved hand," explained the kappa, "Also as before, you must find the toolchest with the screwdriver inside it."

The iron toolchest had the statements:
(1) The screwdriver is not in here.
(2) The screwdriver was bought from Kourindou.

The copper toolchest had the statements:
(1) The screwdriver is not in the iron toolchest.
(2) The screwdriver was traded for from the Moriya shrine.

The lead toolchest had the two statements:
(1) The screwdriver is not in here.
(2) The screwdriver is really in the copper toolchest.

This time, guessing randomly would bring Remilia only 1/3 chance of success. However, she did not guess wildly and was certain to find the screwdriver.

Solution: The second inscriptions on the iron and copper toolchests cannot both be true; at least one is false. Suppose the screwdriver was in the iron toolchest. Then both first inscriptions on the iron and copper toolchests are false, which leads to at least one of the iron and copper toolchests having both inscriptions being false, and therefore both fashioned by knaved hands. But Nitori, a knight, said that no toolchest has a pair of such inscriptions, therefore the screwdriver cannot be in the iron toolchest. Suppose the screwdriver is in the lead toolchest. Then both its inscriptions are false, and therefore both inscribed by knaved hands, which is again impossible. This leaves the copper toolchest, which Remilia chose.

—/—

Colorful Capped Kappa

"Somehow, I can't help but think you planned this," growled Remilia as she threw open her toolchest to find a silver-plated screwdriver within.

"I planned something should happen," Nitori countered, throwing open the remaining two toolchests to show they were empty, "but at my discretion, I could have always chosen to skip the challenges."

"True enough. What is our reward?"

"Your reward is this," started Nitori. "In the Kappa Village, there lives a grey-capped kappa who knows a very important fact about the Kappa King, should she exist."

Remilia nodded calmly as she heard the fact, but at the end of it, she frowned. "Hey, wait a minute! 'Should she exist'?" Remilia realized aloud, then exploded in anger, "You've added that qualifier to the beginning of each of your 'facts' about the Kappa King! What's going on here, kappa! Does she exist or not?"

Nitori tugged significantly at her ear. Remilia took the point and got a hold of herself.

"I will not tell you if she exists. However, you may ask any one of the villagers. Every kappa knows whether or not the Kappa King really exists, though no guarantees he or she will actually tell you, or whether it will be the truth," Nitori stated plainly. "An important thing you should know: we do not have just biological kappa here. There are also kappa-bots. Kappa-bots are externally indistinguishable from ordinary kappa, in both looks and mannerisms. They have only one difference from normal kappa — they are neither knights nor knaves; they may tell lies or truths at their discretion."

Remilia's face pulled in an evil frown. "I have never before been so envious of a machine in my life."

"I feel differently," added Sakuya.

"I suppose the Kappa King is not a bot," Remilia hazarded.

"Quite so. We're not that in love with technology!" Nitori giggled.

Remilia remembered a similar group of puzzles from Smullyan's book, and some of the consequences of having a class of people who could speak both truth and lies. "But including these bots, agents who can lie or tell the truth, throws the usual logic for a loop!" she shouted in protest. One could not use the fact that they lied or told the truth previously to discern whether or not they were telling the truth now.

"We thought this might be the case, so we introduced the system of caps," explained Nitori. "Green caps —like my own— may be worn only by natural kappa, so they are either knights or knaves. Caps of blue, yellow and red each indicate the wearers are exactly one of knaves, knights and bots, though not necessarily in that order."

After a moment, a nasty suspicion entered Remilia's mind. "Are you going to tell us that you won't reveal which colors are exclusive to which group?" she asked dangerously.

"No."

Remilia waited a moment before she came to an even more annoying realization. "You're not going to say it outright, but it is true that you won't reveal it, isn't it?"

"Yes!"

"You're being a real jerk today, Nitori Kawashiro," stated the vampire.

"I've only started," Nitori (or as Remilia thought of her now, Troll-tori) said impishly. "There's another problem. Although if a kappa wears a cap of restricted color, it must correspond to his or her type, a kappa not need wear a cap, and any other color means fuck-all."

"What a useless system!"

"It is sufficient, with a little intelligence," came the kappa's reply, stressing the word 'intelligence.' "Without loss of generality, when a kappa uses the cap system, even when she doffs her cap, it is never far from her. They may be mixed with caps of her companions, though."

—/—

Nitori waved enthusiastically at the two as they braved the forest. "Once you figure out who the Kappa King is, hurry back!" she called to them. "I'll make sure you have her ear!"

"Yeah, yeah," murmured Remilia under her breath. "I'll put something in your ear!"

24. The Trio

It turned out no one really wanted to tell the two anything. As soon as she mentioned that Nitori had refused to tell her the existence of the Kappa King, they clammed up. Clearly, Nitori had something over them.

After half an hour of fruitless searching and questioning, they stopped at a local restaurant. After they settled down, they noticed that the next table over had three kappa idly chatting, and three caps were in a random pile in the center: red, blue, and yellow.

"Excuse me," began Remilia, "I'm new here. Do you mind telling me about yourselves?"

The first kappa (labeled 'Kappa A') said, "I am not a bot."

"That is true," confirmed 'Kappa B,' the second kappa.

"I am a bot," chimed the third, 'Kappa C.'

Remilia was able to tell who the knight, knave and bot were.

Solution: The three system caps reveal that the group consists of one knight, one knave, and one bot. Kappa C cannot be the bot; otherwise Kappa A and Kappa B are a knight and knave agreeing, which is impossible. C cannot be the knight either, since a knight would never claim to be a bot, so she must be the knave. A cannot be the bot, because that would mean B, who by elimination would be the knight, agrees with a lie, which cannot be. A is the knight, so that leaves B as the bot.

—/—

The first kappa clapped her hands together. "Very good, miss," she said cheerfully, then introduced her group, "I'm Kira. The bot is Piita, and the knave is Geiga."

"I am Remilia Scarlet and my maid, Sakuya Izayoi. The usual pleasantries of meeting you," Remilia introduced herself.

"Then you're the vampire girl people have been talking about," Piita said in realization.

Remilia leaned in close to Piita, who blinked bemusedly with a smile on her face. "I-Is something wrong?" she asked, a little nervous of the close scrutiny. The bot certainly was quite well made; no seams, and indistinguishable from a real kappa.

The vampire leaned back, satisfied. "I continue to be amazed by the kappa, though not always for the right reasons," she stated bluntly. "How trustworthy are you?" she asked.

"Very trustworthy," replied Piita.

Remilia glanced toward Kira.

The kappa knight sensed Remilia's skepticism. "Piita very rarely tells lies. She's almost a knight."

"It's a lifestyle choice," added Piita.

Remilia realized she was getting off track. "Be that as it may," she said, getting back on subject, "what can you tell me about a kappa who wears a grey cap?"

Kira's eyes widened. "Ah, that would be Tatari Takeshiro, the Keeper of the King's Secrets," she said. "She lives on the eastern edge of the village, and she wears a grey cap. It's quite distinctive, as she's the only one who wears a cap that color, so she'll be easy to find." She saw the worried look on Remilia's face, and immediately consoled here, "She isn't a bot. However, she will not tell you anything about the Kappa King unless you can prove she exists."

—/—

Tatari Takeshiro, the Keeper of the King's Secrets

As promised, Tatari proved easy to find in her grey cap. She was taking apart some outer world mechanism, mumbling about it being a transportation device. It looked all the world like a bicycle to Remilia.

"Are you Tatari Takeshiro?" asked Remilia.

"I am," she said, looking up.

Good. She's a knight. Remilia ventured, "I understand that you have information on the Kappa King."

Tatari was no nonsense. "Can you prove she exists?"

"Not yet," admitted Remilia.

"Then you're wasting your time," the kappa sighed, reengaging her attentions with the machine. "Ask around. I'll be waiting if you find your answer, at least until the sun sets."

Remilia seethed as she walked back towards the heart of the village. There was no use for it, she needed to figure out the cap system.

25. The Lone Yellow-Cap

A kappa wearing a yellow cap, a system cap, was rushing through the street. Remilia quickly moved to confront the kappa. "Would you mind telling me your type?" she asked, even as the kappa came to a dead stop ahead of her.

"I am not a knight," the kappa answered quickly, and dodged around her to continue on.

Remilia let her go, because now knew what a yellow cap meant.

Solution: A knight could not falsely deny being a knight, while a knave could never truthfully deny being a knight. Therefore, the kappa is a bot. Since the yellow cap is restricted to exactly one of knights, knaves, or bots, it is the bots who wear yellow caps.

26. The Duo

Remilia now knew what a yellow cap meant. That left the other two colors. She saw two kappa not wearing caps, but Remilia might find out more about the cap system from them. She confronted them and asked their types.

"My fellow kappa here is a knight," the first one (Kappa A) answered, indicating her companion.

"My companion, on the other hand, is not a knight," the second (Kappa B) added, hiking her thumb at the first.

Remilia thought about what they said a second before saying, "I know one of you just told the truth, but is not a knight. Do you use the cap system?" The two nodded, but said nothing. Remilia decided to place previsionary trust in them, and requested of them, "Please don your caps."

The two drew out and wore their system caps, enabling Remilia to finally decode the cap system.

Solution: Suppose Kappa A's statement is true. Then Kappa B is indeed a knight, so she's telling the truth in stating A is not a knight. Thus, A has uttered a truth but not a knight; she is a bot who told the truth. Suppose A's statement is false, then B's statement is true, since having uttered a lie, A cannot be a knight. But A falsely claimed B a knight, and therefore B is not a knight, yet B has uttered a truth; she is a bot who told the truth, and A may be a bot (who lied) or a knave. In either case, we have a bot that told the truth.

When the two kappa produced and wore their caps, obviously one was yellow, because one is a bot. The other could not have been yellow or green, because Remilia already knew what both colors meant, nor could it have been any of the non-system colors — in these cases, Remilia would be unable to decode the cap system, contrary to what was given. Kappa A could not be a knight, because only a bot could tell the truth in her place, so if her cap is not yellow (indicating a bot), its color must indicate knavehood. Kappa B cannot be a knave, because she told the truth in all cases, so if her cap is not yellow (indicating a bot), its color must indicate knighthood. In either case, Remilia completely decodes the cap system by process of elimination.

—/—

The first kappa produced a yellow cap and donned it (as expected, she was a bot), while her companion donned a blue cap. Thus, Remilia was able to tell that knights were assigned blue caps, and therefore knaves must be assigned red caps.

Remilia knew the yellow-capped kappa was logically unreliable, so she turned to the blue-capped kappa (a knight). "You should know whether the Kappa King exists, do you not?"

The blue-capped kappa grew a suspicious look. "Why are you asking?"

Remilia's answer slipped out before she could capture and soften it. "Because Nitori refused to tell me who the Kappa King was or if she exists."

The blue-capped kappa narrowed her eyes with a frown on her face. "If Nitori doesn't want to tell you, she must have good reason," she stated bluntly. She tugged at her bot-friends elbow. "C'mon, Chi."

Remilia cursed as the duo walked off, their noses held high in distain.

27. A Cryptic Brush-Off

Remilia flagged down a kappa in a blue cap (hence a knight) and asked her if the Kappa King existed, to which she gave this answer: "I will tell you only if I am a knave."

Remilia let her go, since she was obviously unwilling to tell her.

Solution: An equivalent statement is "If I will tell you, then I am a knave." Since the kappa is a knight, she is certainly not a knave. But her statement is true, and the only way a conditional can be true with a false consequent is if the antecedent is false, so the kappa will not tell Remilia if the Kappa King exists.

28. The Kappa King Exists!

Remilia still had no solid leads on the Kappa King. Ferreting out a knight and asking them directly wasn't working.

"Continuing as you are is most appropriate," Sakuya advised.

Remilia nodded, automatically decoding Sakuya's lie, and thought back to Smullyan's book, trying to remember if one of the puzzles held the key. If there was a way to quickly get the answer from a kappa before her suspicions were raised, then perhaps it would work. She'd maybe get two questions before the kappa clammed up, but if the right questions were chosen, it could work.

She thought of a method. It would only work with a biological kappa, so she looked for a non-yellow cap. She found a green one in the technicolor crowd (the cap system didn't seem popular as yet), indicating a kappa who was either a knight or a knave. She used her vampire speed to interpose herself in front of the kappa.

"Is it true that you once claimed that the Kappa King does not exist after this incident began?" Remilia asked.

The kappa, caught off guard, protested strongly, "No, I've never said that!"

"Well, have you ever claimed that the Kappa King does exist since the incident began?" continued Remilia.

"Yes, I have," admitted the kappa.

Remilia smiled and let her go. She now knew whether or not the Kappa King existed.

Solution: There is no way of knowing whether the kappa spoke truly or not, but we can tell that the Kappa King exists. Suppose the kappa is a knight. Then she really did claim that the Kappa King exists, so the Kappa King does exist. Suppose instead she is a knave. Then it is not true that she never claimed that the Kappa King existed; she actually did once claim that the Kappa King didn't exist, and being a knave, that means that statement is false and the Kappa King does exist.

29. The Kappa King Uncovered

Remilia rushed back to Tatari, and presented her proof that the Kappa King did indeed exist. Tatari nodded and accepted her proof. "Quite satisfactory," she pronounced.

"I've held up my end, Keeper!" came Remilia's gruff announcement. "What can you tell me about the Kappa King?"

Tatari looked almost casual as she stated the single fact, "I can tell you that she has the ear of all kappa."

"What kind of clue is that?" Remilia wondered aloud.

"The only one I have to give," replied Tatari as she returned to her work.

Remilia thought this over for a few seconds, then with eyes suddenly wide with realization, she rushed off towards Nitori's home. "M'lady?" called Sakuya, and followed.

Ten minutes later the door to Nitori's home slammed open, causing the kappa to look up from where she was welding a joint with a blowtorch. It was Remilia, huffing and puffing and looking like she was about to smack someone upside the head. Nitori shut off the valve to the blowtorch and lifted the welding goggles off her eyes. "What is it, Lady Scarlet?"

"I know who the Kappa King is!" Remilia said between gasps.

Solution: The only clue Tatari had to give is that the Kappa King has the ear of all kappa. In particular, she has her own ear. But previously, Nitori (a knight) told Remilia that only she had the ear of the Kappa King — the only kappa to have the Kappa King's ear is the Kappa King herself. Therefore, Nitori is the Kappa King.

—/—

The King of All Kappa

With a mischievous smile, Nitori removed her green cap to reveal she was hiding, not a bald spot, but a small silver crown that was easily concealed by the head covering. "Correct. I am king regnant of all kappa, her majesty Nitori Kawashiro, the Kappa King," she said, covering her heart and bowing slightly.

"I still find it hard to believe that the Kappa King is a girl!" Remilia remarked.

Nitori smiled widely. "If Wriggle Nightbug can be the king of all insects, I can be the king of all kappa."

"Fair enough. I shall tell you why I'm here, then," Remilia said at last, "Ran Yakumo tells me that you kappa are up to something. I want to know what it is you're up to."

30. Kappa of Interest

"There is no current unified project of the kappa. Whatever thing Ran told you the kappa are 'up to' must be a private project," the Kappa King, Nitori Kawashiro, explained as she lead them through the town hall. "We had our own suspicions of what was going on and have been investigating ourselves. We have four kappa of interest waiting in this room. This shouldn't be difficult, since they all use the cap system."

Nitori lead them to a room where four kappa sat behind a bench table. Their system caps were strewn haphazardly in front of them: red, green, blue, and yellow.

"I take that back," said Nitori. "This might be a little difficult."

"Damn. We don't even know who the bot is!" whispered Remilia. "Can't you order them to wear their caps?"

"I won't do that," Nitori said gravely. "I may be king regnant, but I like to believe my people have rights even I can't take away. I can request they wear their caps, but the fact that they've doffed them in the first place indicates they have something to hide. I'll only go as far as to order one and only one kappa to wear her cap."

Remilia let out a breath. "Very well. Let's get on with this."

Nitori turned towards the kappa and requested of them as their king, "Please make one statement about your fellow kappa of interest."

The first kappa, 'Kappa A,' pointed at the third, 'Kappa C,' and said of her, "I am a knight if and only if this kappa is a bot."

The second kappa ('Kappa B') also pointed at the third ('Kappa C'). "This kappa is a knight."

The third kappa, 'Kappa C,' and target of much pointing, pointed back at the second kappa ('B') and said, "This kappa is a knave."

The forth kappa, 'Kappa D,' did not point at any kappa, instead saying, "There are exactly two knights amongst us."

Nitori nodded. "I know that there is a secret project involving the kappa," she continued, "and I know you four know about it. Please tell me what you know."

Kappa A said, "One of our fellow kappa has been indentured into making an EX-ercise Machine."

Kappa B added, "The Aki sisters are not involved."

Kappa C chimed in, "The kappa comes from the Yukkuri district."

Kappa D nodded. "That is true."

Nitori turned to Remilia. "Lady Scarlet, who would you like to wear their cap?"

"Will the kappa who owns the green cap, please wear it now."

The owner jerked, and looked to Nitori. At her nod, she took the green cap and jammed it on her head. From this, Remilia was able to completely determine the types of all four kappa and the truth of all statements.

Solution: The fact that all colors of the cap system are present implies there is at least one knight, at least one knave, and exactly one bot amongst these kappa of interest.

First, we identify the bot. Suppose Kappa B's statement is true. Then Kappa C really is a knight, and is telling the truth when she says B is a knave. But this is impossible, because we would then have a knave who is telling the truth. Therefore, Kappa B is lying, and Kappa C is not really a knight; C is either the bot or a knave. If Kappa C is the bot, then Kappa B cannot be the bot. She also is not telling the truth, so Kappa B is a knave (and C is telling the truth). If Kappa C is a knave, then her statement is a lie and B isn't really a knave, but she didn't tell the truth either, so she's the bot. This narrows the candidates for the bot down to two kappa, B and C, and the other is a knave.

Remilia can be sure that Kappas A and D are not bots, and she's definitely narrowed down one of the knaves to B or C. This leaves one knight and one kappa who is a knight or knave — that is, either two knights or a knight or knave. If Kappa A is telling the truth, then she really is a knight and Kappa C really is the bot. If Kappa A is lying, then it is not true that A is a knight if and only if C is a bot; they must have opposite truth values — it is false that she is a knight, therefore it must be true that C is the bot. In either case, Kappa C is the bot, and hence Kappa B is a knave and thus C told the truth.

If Kappa A is a knave, then there is at most one knight amongst them, which means that Kappa D is a knave by claiming there are exactly two knights. But we know that at least one of them is a knight, so we've reached a contradiction. Kappa A must be a knight. Considering only the first group of statements, we cannot tell what Kappa D is: if she's a knight, then her statement was true — there are exactly two knights; if she's a knave, then her statement was false — there is only one knight.

After the kappa owning the green cap dons her cap, Remilia knew the types of all kappa and the truth values of all statements, even the bot's. We also know that either Kappa A or Kappa B owns (and is now wearing) the green cap. For if Kappa D owned the green cap, then Remilia still could not tell her type, so one of the other non-bot kappa must have donned it. This leaves D to don either a red cap or a blue cap, depending on which of B or A dons the green cap respectively. Either way, Remilia now knows the types of all kappa and consequently the truth value of all statements.

—/—

The first kappa, Kappa A, tugged on her green cap, enabling Remilia to resolve the information completely. "In order, you're a knight, a knave, a bot, and a knight, and we know that one of your fellow kappa from the Yukkuri district was indentured to make an EX-ercise Machine, and we know the Aki sisters are involved," Remilia announced.

"That was very good," came Nitori's genuinely surprised congratulations. "I only knew a Yukkuri kappa was involved because the knowledge of EX-ercise Machines are exclusive to them. I was surprised you figured it out."

"Not half as surprised as I am to discover that you guys actually have a village big enough to have 'districts,'" Remilia said as Nitori wordlessly dismissed the kappa of interest. "What is an EX-ercise Machine?"

Nitori became very grim at that point. "It is forbidden technology," she said ominously, "An EX-ercise Machine is capable of boosting the power of youkai, gods and humans up to the Extra Stage level. Imagine the chaos that would occur if beings in Gensokyo could change their power willy-nilly. Many would want to become more powerful and get their mitts on the machine, others would want to destroy the machine to keep the status quo."

"Ah, that's good," Sakuya said.

"Being one of those creatures who will suffer from this, I'm going to see this EX-ercise Machine is buried," Remilia growled.

(To be continued... unless I'm wearing a red cap)


Note: An anonymous reader pointed out that #28 was not quite right in previous versions. The problem was the kappa could have claimed to have spoken of the Kappa King prior to the incident, which would not be subject to the rules. I've now corrected it.