Skip to content

QWOP Mecha Game

To explore the mechanics of the Roblox game engine, I’m developing a giant mech game where your goal is to knock the opponent mech into buildings.

Here is a test video where I’m seeing how well the mech is able to return to a neutral position. A neutral position simply means a standing straight, so it up to the player to use their limbs to stand back up.

You control the parts of the mech using on screen commands.

controls

You dictate to the mech which position you want each limb to be and it will attempt your command. The head position can also be set.

Buildings will be constructed so that they are barely held together so that when you collide with them they break apart. Collisions with the mech lower your health in some way.

 

 

Advertisements

Clustering Phenotypically Similar Plants

In my post about preventing reproduce between phenotypically unlike plants like grass and trees, I confronted the problem of preventing weird mating patterns within plantlike. I have realized how I will solve the problem: I can use the k-means algorithm to cluster plants genetically. Each plant would present reproductively relevant information as a vector for cluster centroids to adjust to. Plants within the same cluster are possible breeding partners.

Reproductively relevant variables might include width and height. Variables like heliophilia, water retention, and soil nutrient exchange patterns might be worth not considering within the clustering algorithm, as I don’t want to prevent plants from mating because one wants more water than the other, we want those traits to be communicated quickly.

The next question to address is how to pick how to pick the number clusters to assign to a dataset. There isn’t really a ubiquitous answer to how many clusters to use, but off the cuff I think we could restrict membership into a cluster if the cluster is too far away, creating a new cluster once a plant breaks too far from the existing clusters.

Talking like the Robot HK-17

Back in freshmen year, I began designing an AI system that could model the exchange of information between agents with imperfect information about the world around them. I sought to define what actions we accomplish by using speech. At the time, I was only able to come up with “queries” and “statements”. The idea that language only accomplishes the statement of fact and the questioning of facts is too miss out on many important speech acts.

meatbags

The robot HK17 pictured here announces the type of speech act of the sentence before speaking.

Now that I have studied linguistics at university, I can define the parts of language I was attempting to model more accurately. Answering questions like “what does this sentence accomplish” and “under what context does this sentence make sense” fall directly under the category of linguistics called Pragmatics. Pragmatics deals with understanding what speech accomplishes, what is implied and assumed in conversation, what is normally said in response to speech acts, and what is abnormal in conversation.

Using these speech acts alone actors in an AI system can improve their knowledge about their surroundings and improve the situation of their surroundings:

  • Questions [a person P about component C of object O]
  • Assertions [value V of component C of object O]
  • Requests/Commands [a person P to do action A with object O]
  • Promises/Threats [to person P that you will do action A]

Imagine a situation with two people named Joe and Paul who are in charge of managing a furnace conversing about their job.

Joe Question: Quantity[C] coal[O]?

Paul Assertion: Quantity[C] coal[O] 6[V].

Joe Request: Quantity[C] coal[O] 7[V].

Paul Promise: Quantity[C] coal[O] 7[V].

Paul gets 7 coal…

Joe Question: Quantity[C] coal[O]?

Paul Assertion: Quantity[C] coal[O] 13[V].

While this extreme language abstraction seems hard to parse, I feel this will allow for a more human method of solving a ‘real world’ problem with ai. At the same time, programming the context of the situation would be very difficult.

There is a concept called the felicity of a statement. Felicitous statements make sense in their context while infelicitous statements don’t. An infelicitous response to a question is an unrelated answer, for example, answering “the Stealers” when someone says “pass the salt” is an infelicitous response. The AI would know in general to answer questions with assertions, but knowing to request something would depend on priorities given to the ai. The ai would have to know that the furnace needs 13 coal and would need to know to request more.

Billy Jean animation

2DB or not 2DB?

When I originally designed the Mongo schema for my Cosmopolitos simulations, I wanted to keep redundant data to a minimum. To that end, I designed a simulation to be made up of a World entry and Snapshot entry for every day of simulation time. The information that would not change over time, such as the tilt and size of the planet, exists in the World entry while things in flux exist in the Snapshot entries. Snapshots were either going to be nested into World entries or maintain the id of their mother World.

This kind of system amounted in great deal of infrastructure to move between World and Snapshot entries and while easy to conceptualize amounted in lack of extendibility when I wanted to add information to both.

For that reason I decided to merge the two schemas so that each simulation entry could stand up on its own and ostensibly be passed to a different program and so that querying data was simpler.

Beyond Spores and Asexuality

I’ve been thinking alot about how plants might reproduce within Cosmopolitos. Currently, all reproduction is through a mechanism similar to how mushrooms spore, where asexual spores are scattered near an existing plant.

But this is not how most plants you are familiar with work. Plants seeds require pollination in order to reproduce, where male and female gametes are combined in order to form an offspring seed within a fruit. While I have no interest in simulating bee pollination behavior or complex fruit production, the ability to combine successful genetics of two plants together would deepen the Cosmopolitos plant simulation a great deal.

To that end I am adding two part reproduction where a plant must be pollinated by a burst of neighboring pollen before it can produce a seed. All plants have the ability to produce seeds and all plants produce pollen. Pollen, like spores, are dispersed in a radius around a plant and pollinate any plant awaiting pollination. The genes of the pollinator and the pollinated are then crossed and mutated to produce the offspring seed. All seeds in a batch have the same crossed dna but have different mutations. biobook_plantsf_graphik_27.png

Plants will have an advantage over their sporeful cousins, as they will be able to utilize the genetics of two successful plants at once.

Developing mod for Crusader Kings II

One of my favorite games to date is the medieval grand strategy game Crusader Kings II. In it, you play a medieval ruler propagating your dynasty throughout the titles of Europe. One of the more interesting features about the game is the interplay of different religions’ legitimacy as they win and lose holy wars and important kingdoms.

My favorite religions in the game is the Baltic pagan faith Romuva. Romuva is isolated to the kingdom of Lithuania in the Baltic region.

baltic

In my opinion, the religion and corresponding tribal government doesn’t get enough love. I’ve decided to remedy this by creating a Romuva mod for the game. I intend to add ingame events, Romuvan specific occupations, traits, and mechanics.

I’ve mocked up an event based on the Baltic wizard story I read. The Baltic stories are more often than not about charity and honestly, and this event is no different. Here’s a sneak peek at my first CK2 modded event:

sacred

Those interested can find the repo at github.com/thenextguy32/romuva.