Understanding Language, what happens in Hapax when you press "submit"

Started by Legend, Mar 29, 2025, 08:40 PM

0 Members and 1 Guest are viewing this topic.

Legend

Hapax is all about exploiting an alien language to get what you want.

Originally this was very restricted. Players could only say up to three alien words at a time. It works great for the early gameplay loop since the language is almost like casting spells, but it was hard to actually program.

I do not expect most players to learn that many alien words, but every playthrough is unique and different players will learn different ones. So even with only being able to say up to 3 at a time, that is still billions of options. I struggled to find a good way to program it.

At the same time, thanks to my recent efforts to learn the language as a whole, I've realized just how fun and interesting the full alien grammar can be for extra dedicated players. So I really wanted to go back to my og idea and let players submit literally anything.


I think I've found the way. It is not an llm, it's just standard programing, but hopefully it feels as alive as one. The game Sethian fell apart because so many valid inputs just did not work.

Only unsolved element is "actor" selection. If the player says something like "the rock next to the door behind the green object which is similar to the red object," well that is a huge mess to solve! My system at the moment might fail to find a valid combination even if the player is looking right at one. It's rare, but possible.

So I might have to cut stuff like that and put a limit on how big chains can get. A popup saying "query processing, 12 minutes remaining" just wouldn't fit the game's vibe.

Legend

The system for interpreting player intent is also such a beast. I worry it alone will be incredibly slow once I get all the different actions set up. The basic concept is that I have templates that can fit together like lego, and it has to assemble them together until it fully understands the player input. Many concepts in the language are emergent so this can handle that.

Normal human languages are just so incredibly simple :P

Legend

I think I have a solution for when the player submits something with a large amount of potential "actors." It might still be too slow and it might still miss valid combinations but it feels like a good middle ground. Will have to try it out in testing.

The basic concept is that there are a bunch of actor slots. It fills every slot with a list of potential actors, ones that could fit just fine in isolation. It then finds the slot with the lowest entropy, the most obvious choice, and locks it in. Then it propagates that out and fills in all the other slots.

The trick is that it will then repeat this again but starting with the slot with the second lowest entropy. And this time it has a high preference towards selecting an actor that wasn't selected for this role last time. It then propagates out and fills the rest.

Repeats again with the third lowest, fourth lowest, etc. Would have diminishing returns doing this for every slot but for just the first few, it should do a good job of sampling the possibility space. The combination with the best score gets selected.



Might fall apart in practice though. I'm just posting as I code, I haven't tested this method yet.

Legend

Hmmmm

This new more powerful system might be allowing me to modify the main goal, the big challenge of the game. Right now it is translating a specific 3 word sentence. But instead I can make it a full open ended "conversation." So it is asking more from the player in a technical sense, but in a practical sense it's a bit easier because there is a bit of back and forth and the goal is more broad.