2011-10-15

A Million Monkeys: who owns the copyright?

The random sentence program that I wrote about in my last blog entry can output stories.   It's my version of the million monkeys.

As before, it can be downloaded as a simple perl text file from here or in the zip file with the other programs and the source frequency list from here.  

I will add instructions for creating the database soon.   The database is not necessary for using the program, it just makes it faster.

Each story on this page is created once and is unique, the one you are seeing is a story just for you.   Consider these stories copyrighted!   If you copy and use my program, and I encourage you to do so, it is free but I retain copyrights for all stories created by the program!!   All stories will be cc-sa.

This brings up a question for me: who owns the copyright on words generated by a machine?

Edited:  There was a copyright case recently, a photographer vs. wikipedia in which the court decided that a a photographer couldn't claim copyright of a selfie taken by a monkey because it was the monkey's copyright and monkeys can't own copyright.  So I guess the same goes for a machine.

$randsent -t 5 -p 1000 -g

2011-09-26

More random passwords, entropy and words

Following on from my previous blog post I have written a new perl program, this time to create kind of sentence like structures.  It is very simple at the moment but I will continue working on it on and off.  As with the previous programs it is written in perl and like randword it uses Adam Kilgarriff's BNC list from here http://www.kilgarriff.co.uk/BNClists/all.al.gz albeit in a slightly different way - it uses the parts of speech encoded therein.

In looking for the structure of English I found among other things some very interesting pages from this site: http://papyr.com/hypertextbooks/grammar/, specifically the pages on the phrases: the noun phrase, the verb phrase, etc.  What I haven't found yet is anyone who has enumerated the probabilities of the structure: what is the probability, for instance, that the subject phrase of a sentence is a simple pronoun? What is the probability that the main adjective in an adjectival phrase is a verb participle? etc.  I'll probably be working on the way the structure is generated but at the moment the recursivity in the structure seems to have gotten away from me slightly.

This new program called "randsent" creates English-like sentences with a kind of rough grammar so the sentences often seem like English although they may not make a lot of sense.  Of course they're not meant to make sense but to be memorable.  I find it's rather fun to run it and enjoy some of the sentences.  Some of the words from Kilgarriff's list are a bit strange at times.

I've read that this might be done with Markov chains but I'm not familiar with how to do that.  Any interesting ideas, suggestions or rewrites accepted, or encouraged.

As before, it can be downloaded as a simple perl text file from here or in the zip file with the other programs and the source frequency list from here.  


Edit: If you have iframes here is an updating example:
$randsent -t 10 -p 1000






2011-09-15

Random passwords, entropy and words

The concepts of passwords and entropy have generated a lot of discussion especially since the xkcd comic.  One of the basic results is that a small additional password length can add as much entropy to a password as adding a larger range of characters and could be much easier to remember.  Think of it like this if you like: each character in a password might be one of say 26 characters or if you add numbers and uppercase and punctuation maybe around 100 possibilities for each letter.  But the number of words in just  the English language gives you a much larger number of possibilities.

A long while ago I wrote a perl program for generating random passwords.  It and the new ones I talk about here are available under the GPL for you to download and use at the end of this article if you're interested.  To use them you will need a computer that runs perl.

My perl random password generator generates a password of random letters.  The command has lots of options to change the make-up of characters and the way it chooses them
$ randstring
 y5tr0nshc_mf
$ randstring -t 5
 yx02w_zlem79
 38rn91schrud
 2vnr2ujty1tt
 oijmmhpjokrg
 lr2v2vknlwws
For me, what started the idea for extending my random password generator to add random words was when someone on the link list sent me these first two links below.

My first try was a variation on the original which generates a series of wordlike things.
$ randstring -w -t 5
 rie hiuv disu coayu
 esxyi sc aim kyw
 kionuj lujyc oni aoahy
 fii ausnzg gad puku
 zna vymiq as mam
Then I decided to write a program that chooses random words from a dictionary.
$ randword -t 5
 yeta fit fot brach
 casave tid oleous pram
 lawyer Ro coto testa
 drawly ras Trapa Ao
 cosec crappo ay hi
Lastly I added a word generator that uses a weighted random choice based on a word frequency list so it has a tendency to choose more often used words.
$ randword -w -t 5
 look and april mr
 home not grass larger
 child that charts lucky
 the the very these
 andrew very she the
This command has many options including an interesting option to limit the word selection to more or less popular words.  In this next example all the words have a frequency of more than 100 in the list.  This cuts the word list in this case from 236660 entries to 26310.
$ randword -w -t 5 -p 100
 upon quest jokes to
 loved scale 's awards
 do in soft pounds
 for and it the
 us most your of
I'm not going to make a web page to do this at the moment, partly because the word-based password generators use quite a lot of memory and CPU resources and partly because someone has already done it (see below) but mainly because it's a silly idea to use a password from a website on the internet.  So for your benefit I am offering these scripts as a GPL program for those interested in using them.

I should note that the word frequency list is based on a 1989 one from Adam Kilgarriff's BNC lists from and thanks to him for permission to use it.
http://www.kilgarriff.co.uk/BNClists/all.al.gz

Links:
http://www.archonmagnus.com/articles/security/passwordEntropy.php
https://secure.wikimedia.org/wikipedia/en/wiki/Password_strength
http://www.baekdal.com/tips/password-security-usability
https://www.grc.com/haystack.htm
https://www.xkcd.com/936/

I've just discovered that someone wrote a webpage which generated "xkcd" style passwords:
http://preshing.com/20110811/xkcd-password-generator
http://passphra.se/

Here are links to download my programs:
randstring
randwords
tgz archive (includes randstring, randword and the word frequency list).

They are, of course, works in progress and any suggestions, bug reports, etc will be gratefully accepted. 

The dictionary version looks for a standard linux, BSD or MacOS dictionary at "/usr/shar/dict/words" with one entry (word) per line of probably ASCII text.  If you don't have that, you may have to get a copy of it.  I have not internationalized the programs.

2011-01-21

Random musings on Peter F. Hamilton's Commonwealth Saga

Peter F. Hamilton Commonwealth Saga:
Pandora's Star, Judas Unchained

This is really a single book published as two volumes but as each is around 1200 pages, it would be way too big as a single book. It's a pretty good read, complex with many threads.

I have some issues with the "technology". Given of course that in reality advanced technology is not always completely understood by most people using it but it is somewhat of a trope in novels that many things are explained to us the readers that the characters in the book don't get to see.

Longevity:
As a platform for his exploration of longevity with rejuvenation and recording and recloning life the saga is an interesting but distracting platform. As with the wormhole/teleportation technology he doesn't really explore much the possibility of duplication. Perhaps wormholes create teleportation without the issue of duplication but the longevity technology doesn't have the same limitation at all.

Wormholes:
The commonwealth is based on wormhole technology which allows people to move between worlds not too far away (in light years), instantaneously. Generators can create a wormhole between the gateway and a point up to some light years distance. I think of the maths involved in tracking a wormhole between a spot on the rotating and revolving and vibrating Earth and the rotating and revolving and vibrating surface of Mars. Not a simple thing. It is never explained how wormholes are limited by distance. There is some limit. How many light years away is too far? Is the limit energy? Surely wormholes could allow you to skim energy off a sun more directly and open the availability of vast amounts of energy? That is never explored. Is the energy required to set up the wormhole or to run it or to transfer stuff or all three?

I like his use of trains as the main form of transport through the wormholes. A very British idea and well handled. Kind of quantum steam-punk.

One thing that is never explored is the use of wormholes themselves as a weapon. I can't see why you couldn't slice off part of a ship or missile. OK force fields would apparently stop that. Or place a wormhole in front of a missile or ship and transfer it into the sun or far away. Or shoot missiles back into hostile wormholes. None of the ships have their own wormholes as transporters or weapons even though their FTL drive is based on wormholes. A ship equipped with wormhole missile launchers? Transporters to the planet? Why not?

This also brings up the whole problem of what happens at the edges of the wormholes. Especially a floating one, generated by a single gateway at a distance. Also what would happen if a wormhole somehow turned off when you were half way through is not discussed.

2010-12-10

Too big to fail

Part of the fallout of the last couple of wikiweeks is the sudden realisation that on the internet there are only really two major companies that allow you buy stuff over the internet internationally. They are US companies that have been carefully nurtured by the US government with special agreements in various countries around the world and they are beholden to the US government will do their bidding. I'm talking about Visa and Mastercard.

It seems to me that this is a financial monopoly carefully nurtured by the US.

I don't understand why we don't have some kind of international standard to allow other companies to interoperate to make this kind of money exchange possible for many companies. Isn't about time we started?

I wonder too if these companies are now "too big to fail". Surely by now "too big to fail" is an alarm call. "Too big to fail" equals "too dangerous to safely allow to continue".

2010-11-08

Free will and determinism as part of a continuum

Sometimes I am filled with a forbidding mortality.
I'm thinking of my life from the point of view of a Buddhist or Hindu soul at the beginning and the end of a life. Perhaps it's the same as the view of one day in our lives.

If everything is determined then a life is like a book, a play, a movie, predetermined, lived over and over, the same.

It seems as if we have free will and if we have, the view is different at the beginning and the end. At the beginning, a life full of potential to be anything, at the end, completed, fixed, determined. We live life as an observer in a quantum drama, fixing our lives, collapsing potential, choosing choices, moving through it, fixing it to a single fixed trail. I have to ask though, if the life, the day, the week is fixed at the end, how is it not fixed at the beginning?

Yet even our memories are notoriously fickle - two people can remember a particular happening as quite different and as the event becomes distant it blurs.

What if our lives are part of the multiverse, all possible choices made, chosen, fixed, unfixed, all those lives, connected by us, we, I, am the glue that binds all my lives into one, at the beginning and the end of my life, all these lives, all these possibilities, choices.

What if there is a continuum between these choices? A multiverse with some kind of resonance, some kind of probability, preference. A path through the multiverse that is more travelled than the others. Still those other less travelled paths exist on the edge of our lives. Even if that preference is just lives that resonate with this one. Distance from here. A blurring. How much the probability blurs? If the life is more in focus it is like a simple determined life, if more blurred like a resonant path through the multiverse.

I sometimes think we live life as though walking backwards, able to see/remember the past, only able to see briefly into the future, the way we are going, sometimes guessing sometimes missing and bumping into things we didn't see.

2010-09-06

The Internal Language of the Mind

I'm sure this has been thought of before and it is not so simple to put into words.

I was thinking, musing if you like:

Perhaps we really translate language somehow into a kind of internal language in our minds. A language of a symbols which are a complex of related memories and meanings.

Suppose someone gave a speech to three people.

One of those people didn't understand the language and so remembered little of the speech at all.
One of them partly understood and remembered some of it and the last understood it completely and remembered it well.

Later the last was able to repeat the speech but did not repeat the speech as spoken but a slightly different version with a similar meaning.

What is the difference? When you hear a speech you translate it into some internal meaning, some internal language of things meaningful to you in your mind. This is what you really remember, rather than the words themselves.