word algorithms – increpare games https://www.increpare.com let's try something out here... Fri, 18 May 2018 22:16:47 +0000 en-US hourly 1 https://wordpress.org/?v=4.8.2 Semiotic Square Generator https://www.increpare.com/2008/11/semiotic-square-generator/ Fri, 07 Nov 2008 16:41:37 +0000 http://www.maths.tcd.ie/~icecube/?p=818 Here‘s a modified version of some earlier code I write, this time pared down to generate some semiotic square templates as opposed to analogic square templates. I don’t find them anywhere as amusing, but I guess it has some worth of its own anyway…

]]>
Analogic Square and Canonic Form generators https://www.increpare.com/2008/10/semiotic-square-and-canonic-form-generators/ Sat, 04 Oct 2008 05:43:00 +0000 http://www.maths.tcd.ie/~icecube/?p=702 Following a brief elopement with Levi-Strauss earlier this year, I found myself one evening tinkering with a small program to generate semiotic/analogic squares.

Given two pairs of ‘opposites’ (a,b) and (c,d), one can construct a square by juxtaposing different elements from each pair.

For instance, we might get this

body
bad
body
good
mind
bad
mind
good

While reading this book, I came across a similar interpretation of Levi-Strauss’s canonical formula (more about which I will write in a future post) the form of which I’m sure you’ll be able to see by looking at a single example for a moment:

technology
ends
mental
-> technology
means
mental
nature
ends
mental
nature
means
physical

This interpretation is given by Racine, and is not explicit in Levi-Strauss’s original work. I don’t find it especially rich either as interpretations go, but it was interesting to look at the results it could produce.

The resulting program may be seen here.

]]>
Applied Duality https://www.increpare.com/2006/06/applied-duality/ Sun, 18 Jun 2006 21:53:08 +0000 http://www.maths.tcd.ie/~icecube/maths/applied-duality/ (n.b. this articles is mainly, humourous, but some pretty bizzare/interesting things come out of it.)

What’s Duality?

Ok, if you don’t know…duality is a feature of some areas of maths where given a proof you can swap some terms and get the dual of it’s proof. For example, in projective geometry, you can switch the words “point” and “line”, and “meet” and “join” (and some others, but I’m only giving a simple example). So, given the statemenn “two points join to form a line”, you can get “two lines meet to form a point”. See? it works?

Applications

My main object here will be to construct a program that will, given a basic erotic story, reverse the sexes of the participants (and of course it will fail miserably in the process).

So, basically all i have to do is list all the different couples of male/female words. I’m going to avoid objective pronouns because though “his” matches with “her”, so does “him”…so it would work fine from male to female but not vice-versa (because she can have two meanings depending on context) Likewise, her shouldn’t be used as a objective pronoun. This can be overcome with a grammatical parser … but I don’t have time to implement such a program at the moment.

So here’s some things from the list, just to give you a rough idea.

he|she
his|her
penis|vagina
woman|man
womanly|manly

All i have to do is, given a simple story that uses the words above where necessary (and avoids objective pronouns!), is go through every word in the document and replace each word with it’s dual (eg. man with woman).

I’ve constructed a pascal program that does this, so lets see how it reacts to a simple sexual statement:

I say: “The man’s penis made her wet”
It returns: “The woman’s vagina made him hard”

You see, one is the dual of the other :) (insofar as they both make sense, not that one implies the other (necessarily))

Of course, adding in names makes things much less clear, but it doesn’t make too massive a difference to the story.

Take another one that will explain the inside|around coupling I use (forgive the pun:) ):

I say: “The man thrust his penis inside her vagina”
It returns: “The woman thrust her vagina around his penis”

Now, lets input a bigger story that will test my system:

The man’s penis was hard when he arrived at the house. He rang the doorbell once, then twice, his manly fingers, strong and rough, pressing the door-bell. A woman answered, with beautiful breasts, and a gentle, soft voice. She was wearing a dressing gown.

“Please come in” she said, disrobing while closing the door behind the man.

She pulled off the man’s tight-fitting shirt, and he caught the woman’s ass in return.

She was wet, and he was hard. He thrust his penis into her wet vagina, pressing up onto her breasts.

He removed himself from inside the woman, and started to lick the woman’s vagina, before finishing the woman off.

The dual story goes as follows:

The woman’s vagina was wet when she arrived at the house. she rang the doorbell once, then twice, her womanly fingers, gentle and soft, pressing the door-bell. a man answered, with beautiful pecs, and a strong, dry voice. he was wearing a dressing gown.

“please come in” he said, disrobing while closing the door behind the woman.

he pulled off the woman’s tight-fitting shirt, and she caught the man’s ass in return.

he was hard, and she was wet. she thrust her vagina onto his hard penis, pressing up into his pecs.

she removed herself from around the man, and started to suck the man’s penis, before finishing the man off.

You see, it’s fairly effective, though not perfect. (the story i will admit is a little fabricated and lacking in body).

There are some slightly funny slip ups I’ve encountered, including hard pecs becoming wet breasts, and wet flaps becoming hard foreskin…still, it’s not that bad (at worst it’s humourously disturbing)

It’s also possible, using my algorithm, to turn a hetrosexual story into a homosexual story (though this may get confusing unless you use names), or a homoseuxal story into a oppositely-sexed homosexual one, but not to change a homosexual story into a hetrosexual one, because for that to happen it would have to be able to tell who’s doing what, and my simple algorithm isn’t up to that. :( Such a one-way mapping such as that from a hetrosexual erotic story to a homosexual erotic story is called a homomorphism.

I won’t disturb your minds with any more with examples, though note how agressive the women who used to be men can be?

Of course another problem with the program is the names…but can’t be bothered messing with those it’s really hard to do that because names’ spellings are fluent and oft abbreviated and otherwise fucked with.

I have written a web-program that will carry out this process … go here to check it out :) (some of the word-switching is different and much more developed … but nothing too much has changed .. if you want the code just mail me okay?)

]]>
Generic Proverb Generator https://www.increpare.com/2005/09/generic-proverb-generator/ https://www.increpare.com/2005/09/generic-proverb-generator/#comments Tue, 13 Sep 2005 13:46:01 +0000 http://www.maths.tcd.ie/~icecube/?p=293 I’m quite proud of it *proud*, despite the grammatical incompatibilities (which could be fixed, but I don’t really want to put that much time into it).

Generic Proverb Generator

]]>
https://www.increpare.com/2005/09/generic-proverb-generator/feed/ 16
Generating word-sequences https://www.increpare.com/2005/03/generating-word-sequences/ Sun, 06 Mar 2005 17:53:39 +0000 http://www.maths.tcd.ie/~icecube/wordpress/?p=220 Nested Words

In response to this post by
Qwantz, I generated a list of words of the type he suggested; namely ones that you can form by appending a letter to either side of a word of that form (and “a” and “I” are words of that form).

For instance, he came up with as an example

I->lie->alien->salient

I used the scowl dictionary which can be got here.
The problem with this is that it is a little too big, and many of the words are nowhere else to be
found, and don’t seem to mean much. But at least my program generats a finite list of
words that you can check through.

Here are my wordlists of length n (words of length 2n are required to be generated from a 2 letter
word in the scowl wordlist). Of course, the only ones worth looking at are the 7+ ones.

Words of length 1 (2 words)
Words of length 2 (283 words)
Words of length 3 (504 words)
Words of length 4 (4421 words)
Words of length 5 (1843 words)
Words of length 6 (3742 words)
Words of length 7 (392 words)
Words of length 8 (205 words)
Words of length 9 (10 words)
Words of length 10 (1 word)

Of course, a generalisation that might give more interesting cases would be to allow the sequence to
terminate at three, four, or five letters instead of just 1 or 2, or to allow for not-so-symmetric
adding. But I don’t feel like doing those. If you generate them and come across anything
interesting, I’d love to hear!

Source Code (uncommented, but short)

In PERL. Obviously usernames and passwords removed. To run, pipe some wordlist (1 word per line)
into the program (note, you will have to have the table created already (I included the command in
the comments at the start)), say

perl addwords.pl < wordlist.txt

addwords.pl

Then you create another table (i called it “nestedwords”), and add all words of length 1 and 2 to it
(note that in my dictionary, all letters were counted as words of length 1, so I just added “i” and
“a” manually to stop things from going too crazy, but length 2 is dealt with properly by the
following command).

To generate the words of length n, given that you already have words of length n-2 in nestedwords,
just modify the $length variable in generate.pl, and run it.

All it does is go throughall words of length n in the wordlist table, chop off the first and last
character, and see if this generated word is in the table nestedwords. (I think this is the best way
to go about generating these words).

generate.pl

To output the list of words, just run outputwords.pl

]]>
I have a dream https://www.increpare.com/2004/07/i-have-a-dream-2/ Wed, 21 Jul 2004 00:51:18 +0000 http://www.maths.tcd.ie/~icecube/writing/i-have-a-dream/ (In a style suggested me by Nasa).

I am happy to join with you today in what will go down in history as the greatest demonstration for freedom in the history of our nation, bitch.

Five score years ago, a great American, in whose symbolic shadow we stand today, signed the Emancipation Proclamation, bitch. This momentous decree came as a great beacon light of hope to millions of Negro slaves who had been seared in the flames of withering injustice, bitch. It came as a joyous daybreak to end the long night of their captivity, bitch.

But one hundred years later, the Negro still is not free, bitch. One hundred years later, the life of the Negro is still sadly crippled by the manacles of segregation and the chains of discrimination, bitch. One hundred years later, the Negro lives on a lonely island of poverty in the midst of a vast ocean of material prosperity, bitch. One hundred years later, the Negro is still languished in the corners of American society and finds himself an exile in his own land, bitch. And so we’ve come here today to dramatize a shameful condition, bitch.

In a sense we’ve come to our nation’s capital to cash a check, bitch. When the architects of our republic wrote the magnificent words of the Constitution and the Declaration of Independence, they were signing a promissory note to which every American was to fall heir, bitch. This note was a promise that all men, yes, black men as well as white men, would be guaranteed the “unalienable Rights” of “Life, Liberty and the pursuit of Happiness, bitch.” It is obvious today that America has defaulted on this promissory note, insofar as her citizens of color are concerned, bitch. Instead of honoring this sacred obligation, America has given the Negro people a bad check, a check which has come back marked “insufficient funds, bitch.”

But we refuse to believe that the bank of justice is bankrupt, bitch. We refuse to believe that there are insufficient funds in the great vaults of opportunity of this nation, bitch. And so, we’ve come to cash this check, a check that will give us upon demand the riches of freedom and the security of justice, bitch.

We have also come to this hallowed spot to remind America of the fierce urgency of Now, bitch. This is no time to engage in the luxury of cooling off or to take the tranquilizing drug of gradualism, bitch. Now is the time to make real the promises of democracy, bitch. Now is the time to rise from the dark and desolate valley of segregation to the sunlit path of racial justice, bitch. Now is the time to lift our nation from the quicksands of racial injustice to the solid rock of brotherhood, bitch. Now is the time to make justice a reality for all of God’s children, bitch.

It would be fatal for the nation to overlook the urgency of the moment, bitch. This sweltering summer of the Negro’s legitimate discontent will not pass until there is an invigorating autumn of freedom and equality, bitch. Nineteen sixty-three is not an end, but a beginning, bitch. And those who hope that the Negro needed to blow off steam and will now be content will have a rude awakening if the nation returns to business as usual, bitch. And there will be neither rest nor tranquility in America until the Negro is granted his citizenship rights, bitch. The whirlwinds of revolt will continue to shake the foundations of our nation until the bright day of justice emerges, bitch.

But there is something that I must say to my people, who stand on the warm threshold which leads into the palace of justice: In the process of gaining our rightful place, we must not be guilty of wrongful deeds, bitch. Let us not seek to satisfy our thirst for freedom by drinking from the cup of bitterness and hatred, bitch. We must forever conduct our struggle on the high plane of dignity and discipline, bitch. We must not allow our creative protest to degenerate into physical violence, bitch. Again and again, we must rise to the majestic heights of meeting physical force with soul force, bitch.

The marvelous new militancy which has engulfed the Negro community must not lead us to a distrust of all white people, for many of our white brothers, as evidenced by their presence here today, have come to realize that their destiny is tied up with our destiny, bitch. And they have come to realize that their freedom is inextricably bound to our freedom, bitch.

We cannot walk alone, bitch.

And as we walk, we must make the pledge that we shall always march ahead, bitch.

We cannot turn back, bitch.

There are those who are asking the devotees of civil rights, “When will you be satisfied?” We can never be satisfied as long as the Negro is the victim of the unspeakable horrors of police brutality, bitch. We can never be satisfied as long as our bodies, heavy with the fatigue of travel, cannot gain lodging in the motels of the highways and the hotels of the cities, bitch. We cannot be satisfied as long as a Negro in Mississippi cannot vote and a Negro in New York believes he has nothing for which to vote, bitch. No, no, we are not satisfied, and we will not be satisfied until “justice rolls down like waters, and righteousness like a mighty stream, bitch.”

I am not unmindful that some of you have come here out of great trials and tribulations, bitch. Some of you have come fresh from narrow jail cells, bitch. And some of you have come from areas where your quest — quest for freedom left you battered by the storms of persecution and staggered by the winds of police brutality, bitch. You have been the veterans of creative suffering, bitch. Continue to work with the faith that unearned suffering is redemptive, bitch. Go back to Mississippi, go back to Alabama, go back to South Carolina, go back to Georgia, go back to Louisiana, go back to the slums and ghettos of our northern cities, knowing that somehow this situation can and will be changed, bitch.

Let us not wallow in the valley of despair, I say to you today, my friends, bitch.

And so even though we face the difficulties of today and tomorrow, I still have a dream, bitch. It is a dream deeply rooted in the American dream, bitch.

I have a dream that one day this nation will rise up and live out the true meaning of its creed: “We hold these truths to be self-evident, that all men are created equal, bitch.”

I have a dream that one day on the red hills of Georgia, the sons of former slaves and the sons of former slave owners will be able to sit down together at the table of brotherhood, bitch.

I have a dream that one day even the state of Mississippi, a state sweltering with the heat of injustice, sweltering with the heat of oppression, will be transformed into an oasis of freedom and justice, bitch.

I have a dream that my four little children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character, bitch.

I have a dream today, bitch!

I have a dream that one day, down in Alabama, with its vicious racists, with its governor having his lips dripping with the words of “interposition” and “nullification” — one day right there in Alabama little black boys and black girls will be able to join hands with little white boys and white girls as sisters and brothers, bitch.

I have a dream today, bitch!

I have a dream that one day every valley shall be exalted, and every hill and mountain shall be made low, the rough places will be made plain, and the crooked places will be made straight; “and the glory of the Lord shall be revealed and all flesh shall see it together, bitch.”

This is our hope, and this is the faith that I go back to the South with, bitch.

With this faith, we will be able to hew out of the mountain of despair a stone of hope, bitch. With this faith, we will be able to transform the jangling discords of our nation into a beautiful symphony of brotherhood, bitch. With this faith, we will be able to work together, to pray together, to struggle together, to go to jail together, to stand up for freedom together, knowing that we will be free one day, bitch.

And this will be the day — this will be the day when all of God’s children will be able to sing with new meaning:

My country ’tis of thee, sweet land of liberty, of thee I sing, bitch.

Land where my fathers died, land of the Pilgrim’s pride,

From every mountainside, let freedom ring, bitch!

And if America is to be a great nation, this must become true, bitch.

And so let freedom ring from the prodigious hilltops of New Hampshire, bitch.

Let freedom ring from the mighty mountains of New York, bitch.

Let freedom ring from the heightening Alleghenies of Pennsylvania, bitch.

Let freedom ring from the snow-capped Rockies of Colorado, bitch.

Let freedom ring from the curvaceous slopes of California, bitch.

But not only that:

Let freedom ring from Stone Mountain of Georgia, bitch.

Let freedom ring from Lookout Mountain of Tennessee, bitch.

Let freedom ring from every hill and molehill of Mississippi, bitch.

From every mountainside, let freedom ring, bitch.

And when this happens, when we allow freedom ring, when we let it ring from every village and every hamlet, from every state and every city, we will be able to speed up that day when all of God’s children, black men and white men, Jews and Gentiles, Protestants and Catholics, will be able to join hands and sing in the words of the old Negro spiritual:

Free at last, bitch! free at last, bitch!

Thank God Almighty, we are free at last, bitch!

]]>