News:

It's not laughter if you're just going through the muscle movements you remember from the times you actually gave a fuck.

Main Menu

Paes' Programs

Started by Pæs, August 16, 2013, 03:26:43 AM

Previous topic - Next topic

Pæs

I've started a couple of threads intending to track my progress in developing with one programming language or another but I get easily distracted when, in the documentation for one language I've half learned, I see information about another language I'd like to learn more of, so these threads don't go anywhere useful.

In this thread, I am going to jump from one development topic to another with reckless abandon.

My only formal education in HTML/CSS was at intermediate school when I was 13 when I co-developed our school website with a friend of mine. I've made do with the knowledge from then with all web development efforts since but in approaching HTML5 and CSS3 figured I'd better put a bit of time and effort into learning what's changed and what is best practice now that we have to write pages which work on phones, tablets, smartwatches, laptops, widescreens, televisions and more, so I've jumped into code academy and finished their web fundamentals track, their javascript track and their jQuery track. I think I might start playing with HTML5 game development so I'm looking at what kind of game I might like to put together as a demo.

I've got this idea that I'm working on with a bird's eye view game where you play a person moving about a square (or a city if the game could handle such an increase of scale) which is populated with very basic NPCs who also just kind of wander about. Every character in the game carries with them a collection of beliefs. There will be background logic in the game dictating whether belief a is compatible/in conflict with belief b.

So you approach and NPC and engage in conversation with them. Depending on the compatibility of your beliefs, one of you might come away with a new belief, have one of your existing beliefs strengthened, or (more rarely) begin to question one of your beliefs. I'd also like to include a mechanic by which beliefs can be compared to reality as a randomly scripted event, where the character either increases their attachment to their belief, keeps their attachment and finds some way to explain away the evidence, or challenges their belief.

The dynamic I'm imaging is a system whereby if you manage to convert a bunch of characters to your belief, you can all just kind of mill about together and reject any intruding belief carriers, strengthening your beliefs by bouncing off each other in an echo chamber... and if you want to break down existing groups like this you have to approach those most susceptible to your character's combination of beliefs and start to convert the group from there.

While I keep thinking on that, I'll be reading into HTML5 game dev with a minimalist demo of this idea in mind, probably a bunch of circles bouncing off each other in a box... and post in this thread as I think more about it or if I get distracted by something else.

Pæs

I'll also modify this post with ideas for things to include in the meme game.


  • I could give characters beliefs about each other, so these biases also factor into who they are willing to engage with.

GrannySmith

:D That's a really really good idea for a game! :D I would probably play that devotedly. But why did you call it a meme game? (i have no idea what that means)
  X  

Pæs

Quote from: GrannySmith on August 16, 2013, 05:48:11 AM
:D That's a really really good idea for a game! :D I would probably play that devotedly. But why did you call it a meme game? (i have no idea what that means)

http://en.wikipedia.org/wiki/Memetics

So the game is about the transfer of memes or units of cultural information and how those memes interact with one another.

Triple Zero

Cool! Please to link when you have a simple demo going! :)
Ex-Soviet Bloc Sexual Attack Swede of Tomorrow™
e-prime disclaimer: let it seem fairly unclear I understand the apparent subjectivity of the above statements. maybe.

INFORMATION SO POWERFUL, YOU ACTUALLY NEED LESS.

Junkenstein

Watching and waiting with interest. Have you started working out the mechanics in detail?

What kind of setting are you going for? Is this going to be related to real world beliefs or are you going to substitute in meaningless things that convey the same effect?
Nine naked Men just walking down the road will cause a heap of trouble for all concerned.

Cramulus

Very interesting! How will beliefs interact?

is it like, each belief has metadata, and the interaction is on the basis of that metadata?


Like I'm imagining something like (and I'm just making this up as I go)

Belief: "Bananas are high in petroleum."
Type: Nutrition
Topic: Bananas
Strength: 4 (out of 10)
Veracity: False


and then when the NPC bumps into another NPC, she'll say "Bananas are high in petrol!"

and if the other NPC has a Nutrition belief which is higher strength than 4, he will reject it, otherwise he will pick it up at 1 point higher strength.

And then somewhere in the world, there is a banana
and if an NPC bumps into it and he has a banana belief which is false, its strength is decreased
if he has a banana belief which is true, its strength gets increased

Junkenstein

Quoteand if the other NPC has a Nutrition belief which is higher strength than 4, he will reject it, otherwise he will pick it up at 1 point higher strength.

And then somewhere in the world, there is a banana
and if an NPC bumps into it and he has a banana belief which is false, its strength is decreased
if he has a banana belief which is true, its strength gets increased

Building on that, would 10 be a sufficent range? To me I'd go to 100 and that allows for other objects in the world environment that interact differently with the belief.

Example -

Banana - 1 point positive
Banana skin - 1/2 point positive
Banana skin in puddle of petrol - 1/2 point negative
Banana in puddle of petrol - 1 point negative
Banana on tree - 5 points positive

I'm thinking that there should probably be degrees pushing positive/negative considering this is how life kind of works.

Another example: Religion belief

Meet believer - 1 point positive
Meet non-believer - 1 point negative
Meet Dawkins - 5 points negative and acquire "X" belief.
Meet Religion's deity - 5 points positive and acquire "Y" belief.

Or something. I'm trying to get the "I met god and he seems legit" possibility in there somehow.
Nine naked Men just walking down the road will cause a heap of trouble for all concerned.

Telarus

Telarus, KSC,
.__.  Keeper of the Contradictory Cephalopod, Zenarchist Swordsman,
(0o)  Tender to the Edible Zen Garden, Ratcheting Metallic Sex Doll of The End Times,
/||\   Episkopos of the Amorphous Dreams Cabal

Join the Doll Underground! Experience the Phantasmagorical Safari!

Pæs

Decided to throw up a blog about this and will cross post between this thread and there.

Questions I've been asked about the concept:

QuoteWhat kind of setting are you going for? Is this going to be related to real world beliefs or are you going to substitute in meaningless things that convey the same effect?

The setting will initially be totally lacking. I am imagining the game as a collection of very basic looking sprites randomly traipsing about a white square while I learn how HTML5's canvas works.

The second question is related to the next question.

QuoteVery interesting! How will beliefs interact?
is it like, each belief has metadata, and the interaction is on the basis of that metadata?

Like I'm imagining something like (and I'm just making this up as I go)

Belief: "Bananas are high in petroleum."
Type: Nutrition
Topic: Bananas
Strength: 4 (out of 10)
Veracity: False

and then when the NPC bumps into another NPC, she'll say "Bananas are high in petrol!"
and if the other NPC has a Nutrition belief which is higher strength than 4, he will reject it, otherwise he will pick it up at 1 point higher strength.
And then somewhere in the world, there is a banana and if an NPC bumps into it and he has a banana belief which is false, its strength is decreased. if he has a banana belief which is true, its strength gets increased

I am thinking that initially, unless I can flesh out a good way for specific real world beliefs to interact, I will use a simple system of meaningless beliefs which will contain metadata describing their relationships to other beliefs.

Beliefs will be as simple as:

Belief A:

Logically follows: [Belief C, Belief Z, Belief D]; //this will allow beliefs to emerge naturally as well as impact which beliefs a character is more susceptible to.

In conflict with: [Belief F, Belief B, Belief S]; //I am thinking I'll have different levels of conflict to describe how aware a character is of the conflict. Atheism and Christianity are clearly in conflict IRL but are there also conflicts between Christianity and Homophobia which could create internal distress but not cause a person to reject either of these ideas?

Will need to put some thought into what other relationships beliefs have with one another and am hoping to iterate on beliefs to describe real world beliefs and their relationships.

So an NPC will bump into another NPC or into the character and one will say to the other "I believe A" and the other character will respond "I have considered A within the context of my belief system and find that it is(n't) compatible. Further to this, it has strengthened/weakened my belief in B". Maybe they will go on to compare beliefs with logically follow. I think that the mechanic for choosing the belief that is discussed will be based upon the strength of their respective beliefs and common ground they have.

The player character may have the ability to choose a topic of discussion. Still have to consider how that fits into the strategy.

The description of encountering a banana in the world is pretty much spot on, though in the small scale version of this game, encountering evidence for or against beliefs will probably be a randomised event, rather than the result of discovering an object in the game world. I'll have to test how complex the game can get before the concept has to be moved to a more powerful engine.

Triple Zero

Quote from: Pæs on August 17, 2013, 02:06:58 PM
Belief A:
Logically follows: [Belief C, Belief Z, Belief D]; //this will allow beliefs to emerge naturally as well as impact which beliefs a character is more susceptible to.

In conflict with: [Belief F, Belief B, Belief S]; //I am thinking I'll have different levels of conflict to describe how aware a character is of the conflict. Atheism and Christianity are clearly in conflict IRL but are there also conflicts between Christianity and Homophobia which could create internal distress but not cause a person to reject either of these ideas?

couldn't you solve that by giving each character an "intelligence score", which determines how far they will actually follow a trail of "logically follows" connected beliefs?

because that is kind of somewhat sort of what is going on in those cognitively dissonant pretty Christian minds, is it not?

also, coding advice, dunno if it's useful but one thing that may save you quite a bit of headache:

Javascript has no built-in datatype for sets. And those lists of beliefs above are basically sets. Sets are different from lists/arrays in the sense that the elements are in no particular order, and all elements have to be unique.

You can use a Javascript Array to hold a set of course, but if you define a couple of general functions that do useful set operations (with arrays as arguments) you're going to have much easier time:



function contains(item, set) { // set membership, returns true or false
  return set.indexOf(item) != -1;
}

function equals(setA, setB) { // set equality test, returns true or false, assumes sets are sorted
  if (setA.length != setB.length) return false;
  return setA.every(function (v, i) { return v == setB[i] });
}



it helps if you always keep your sets sorted, that way two sets with the same elements will always have them in the same order, too. knowing a set is always sorted, will help out in many situations. to do this you need some extra functions



function array_to_set(arr) { return arr.sort(); }

function add(item, set) {
  if (contains(item, set)) return;
  set.push(item)
  set.sort();
}

function remove(item, set) {
  var i = set.indexOf(item);
  if (i == -1) return;
  set.splice(i, 1);
}

function union(setA, setB) {
  var u = setA.concat(setB);
  u.sort(); 
  u = u.filter(function (v,i,a) { return v != a[i+1]; }); // removes duplicates
  return u
}

function intersection(setA, setB) {
  return setA.filter(function (v) { return contains(v, setB) });
}

function subtract(setA, setB) {
  return setA.filter(function (v) { return !contains(v, setB) });
}

// i tested these with
// equals(intersection(union(p,q), p), q)
// seems legit.



I dunno why I just wrote all that code, not even knowing if it'd be useful to you--the answer is: it's more fun than a sudoku :) Some of them could theoretically be made more efficient by taking better advantage of the fact the lists are sorted, but as long as you're not going to use sets with thousands of elements, this works just fine.
Ex-Soviet Bloc Sexual Attack Swede of Tomorrow™
e-prime disclaimer: let it seem fairly unclear I understand the apparent subjectivity of the above statements. maybe.

INFORMATION SO POWERFUL, YOU ACTUALLY NEED LESS.

Pæs

Good thoughts Trip! And I'm sure that code will be useful, I hadn't got as far as looking at how I'd handle the arrays but those functions look very handy.

Ixxie

Awesome idea!

I had a similar idea last year but for more classical biological process of Genetic Evolution. Considering my field of research is Sociocultural Evolution (the field which evolved from Memetics), its quite weird I didn't think to add this level of evolution as well! I am loving this idea - so please forgive me if the following elaboration on. It might be a tad long and elaborate, and is certainly way too theoretical and complex to be completely implementable, but I hope it helps.

The main distinction between the concepts of Memes and Culture is that Culture is defined as Socially Learnable Behavior. Since behavior is directly observable while memes are not, this has become the new paradigm for science. One consequence of this definition is that we now have recorded cases of culture in not only primates and other mammals - but also in some species of birds and fish!

That said - for making a game like this, you don't have the need to restrict yourself to the observable, so making use of memes (which might be defined as a disposition for expression of a belief) is probably far more convenient. However I would point out that in practice humans could often express directly conflicting beliefs because we have framing bias - thus one can also see belief as a behavior in that its a verbal affirmation. If conflicting beliefs are expressed in different contexts (different frames) then the conflict might not be so obvious. Of course - as others pointed out - beliefs that conflict enough would probably eventually result in the rejection of one or more in an effort for consolidation.

Trip's comment about the ability to do logical inference - and applying some kind of reasoning metric - is very nice. I have been having a little hintergedanke recently about viewing the space of sociocultural evolution as a sort of dual-space of the Social Network and the Conceptual Network.

The first space is the Social network - with the nodes representing Agents and the links representing Relationships or Interactions. Culture / Memes are transmitted across the social network, although of course us humans also transmit them across technological networks like the internet or bibliographic networks.  Now topology of these kinds of networks is typically drastically different to a regular grid - often having what is known as small-world and scale-free configurations which have a few hubs that connect to a significant fraction of the networks total number of links. Social animals might be modeled as diffusing freely in 2D space - but this would miss a big part of their behavior - namely the tendency to be friendly or antagonistic to particular individuals. Why or how individuals form particular types of links can depend on many processes - for example on past behavior. It can also be biased depending on beliefs of course - by means of homophilia / heterophobia / discrimination for certain classes of beliefs. Thus the Network and the Culture can Coevolve (I am investigating models like this for my thesis, I call them Discordian Adaptive Networks   :evil: ).

Now the Conceptual Network in contrast - would have the nodes representing Memes or Cultures and the links representing Deductive or Inductive or Productive connections between them - or any other correlation that is relevant. This is far more speculative and less grounded in current science, but might be fun for this game. Humans and other animals expand their behavioral repertoire by both individual and social learning - and the exploration of the Conceptual Space could be done in either way. Trial and Error tinkering, as well as Reasoning and Inference, could help an individual make such leaps across this network. But observing another is a vastly faster and easier way to make bigger leaps. In the literature there is the concept of the trade of between Exploration and Exploitation - trying a new idea has a risk, but you also have a great opportunity to gain much. This makes me think of one paper about Geese - where they observed that Bolder Geese (i.e. less neophobic), tend to use less social information than their more timid counterparts.

I guess it might be conceivable to make a simple dual-space analogue on a computer, but I have no idea how easy it is to make in a browser. Anyway - I will now terminate this harangue. Hope this was helpful - and if you want more references or ideas feel free to ask! I would love to help in any way I can. I am often on #discord.

http://en.wikipedia.org/wiki/Cultural_evolution
http://en.wikipedia.org/wiki/Dual_inheritance_theory

"In Shadow - we find the Light - Safely Sealed in Darkest Night, so make Sure Ya'll Keep it Tight. Wizards Only - Fools!"

Junkenstein

1 - Hi new Guy!

2 - That's the best first post I've seen for a while. Actual information content with things to think about.

3- More of this please.

Nine naked Men just walking down the road will cause a heap of trouble for all concerned.

Cramulus