Hacker News new | past | comments | ask | show | jobs | submit login
Create a Robot Image from any text string (robohash.org)
319 points by e1ven on July 8, 2011 | hide | past | web | favorite | 101 comments

Morning, I created this as an extended-weekend project, after realizing that I'd need these hashes as a part of larger project I'm working on.

Basically, Text goes in, Picture of a Robot comes out.

Where I'm using this is sort of like an identicon, to help quickly identify a poster's 4096-bit public keys, and see if you're talking to the same man.

Is it perfect? No, but it's a quick visual guide to any text, in the form of faces, which are easy for people to remember.

Robohash looks great. As the 'inventor' of Identicon, I've been meaning to revisit the subject with animal (identimal) or robot (identibot) themes in mind so it's nice to see your rendition of the later. Well done, sir.

Identicons are a great idea, I really love them.. They're a good solution to a gut-check "Something is wrong here.."

Sort of like a SSH-fingerprint.

The problem I've had with them is that they're generate not all that memorable. Was that triangles pointing left, then up, or up then left?

This is my attempt at addressing that problem for my own new project, but I'd love to see what you build! If you want to use these images, feel free. They're CC-BY, so they're open to the world now ;)

Re 'not all that memorable', that's because identicons were originally designed for 'distinguishing' and 'matching' data, not 'memorizing'.

Abstract geometric identicons like my original implementation as well as variations used at Wordpress and StackOverflow are, while nearly impossible to remember, distinguishable in a pile which comes in handy when distinguishing the 'voice' of individuals in a long thread of comments.

To use identicons as permanent identity, one has to 'identify' with their identicon. We can identify faces of our friends because we shared memories with them, stories if you will.

So robotic identicons like yours can be made more memorable if users had some ways to create a story they can associate with it like 'blue viking with left arm missing', etc.

Using stories is a great idea, but I'm not sure how doable it is to generate images that suggest a story (certainly, harder than cute variations on robots); in addition, those stories have to be memorable i.e. make sense, as stories. I think that's approaching a hard problem, maybe even hard AI.

But I like the idea. Perhaps the image problem could be met by combining it with a bio (giving a story); and the "make sense" problem could be addressed by a story grammar (following the hero's myth as a template, with recursive and optional parts), written using templates consisting of canned pseudo-english sentences with gaps filled by a set of names, objects, places that play the various roles in the "hero grammar": the key, the sword, the grail, the shadow, the mentor, the ordinary world, the special word, various thresholds - perhaps some word generation for place names. If the story made sense, as a journey, it might be memorable, even stirring in an awkward way, despite all the grammar/template/presets...

Of course, maybe I'm wrong: "<color> <warriortype> with <injury>" is already fairly rich. Even, extending it to incongruous occupations (surgeon, nurse, motorcyclist, developer). Perhaps, like theatresports, just starting points of a place, occupation and problem is enough to suggest a story to the user?

Right. If employees of Apple gets certificates with O = "Apple" and OU = "Engineering" which maps to a red apple badge on their robot's body and a gear mark on the arm, people could potentially learn to 'parse' that at a glance.

Everywhere we look in RL, there are stories being told all the time.

That makes a lot of sense. I wasn't trying to be disparing. It's a great idea, and very helpful, I just felt like it could go in a slightly different direction for this specific use-case (Public Keys)

[didn't find a reply link to your more recent comment so I'll reply here]

I think an interesting way to apply identicon to certs is to map each cert attributes to an 'attribute' of identicon, visualizing attributes.

What are the odds of a collision? How many unique elements are there that can make up a robot?

If you use all three sets, and enable backgrounds, the collision chance is much lower.

Each Robot is made up of 6 sets of 10 choices each, plus backgrounds.

It's not perfect, but it's enough to give you a basic view into "Is this the same guy or not"

as in 10^6 possibilities, ignoring backgrounds? For the curious, that means collisions are expected >50% of the time with ~1200 samples, and someone could easily generate collisions on purpose with little effort.

So it works well for a simple signal (which is the goal), but shouldn't be relied on if people might try to abuse it.

If you use all three sets (?set=any), plus backgrounds, that adds two additional choices, which brings us into the 100+ Million category. As a signal to review the Pubkey, that's probably enough.

I could have made up more Random elements, but that'd take more time/money, which isn't worth it unless anyone outside of me actually wants it ;)

It seems like it would give you a false sense of security. You have to think about it in terms of "could an attacker who can spend $1000/hr brute force a duplicate pub/priv key combination that generates the same robot.

I wonder if you could get better results using a markov chain to generate english prose from a large sample. If you take the top N next word options, and select one based on the next log_2(N) bits of your hash/key, you lose no key space and should get a nonsensical but perhaps easily remembered string.

Sounds like it would be a pretty good "did I type my password correctly?" indicator.

Lotus Notes has one of those with a set of keys. I recall that the first couple of times it was weird -- then it seemed to make sense. What is really weird though -- it puts in additional XX characters when you typed out your password. So type out "pass" and it might display "XXXXXXX" Which I guess is effective for preventing over-the-shoulder information leakage but weird all the same.

You might be interested in Chroma Hash for that sort of purpose: http://mattt.github.com/Chroma-Hash/

woudn't you need to be sending the password over to the robot icon people to get the imag?

This is extremely well done.

But incidentally:

see if you're talking to the same man

comes across a bit odd, seeing as lately a few women and children have been reported using IP addresses.

Sorry, too late to edit the comment now, HN won't let me anymore. I was using man generically, not specifically. Mankind, if you will.


I wouldn't worry about it. You didn't come off as sexist or anything; it was clearly just informal colloquial speak.

The concern here is not that the poster comes off looking like a bad person, because clearly he* doesn’t, but that unintentionally sexist language persists.

If I had corrected the poster’s lack of a final slash in his s/// syntax, I wouldn’t have been implicitly accusing him of being an incompetent programmer, because it’s a common and small mistake that I make too. But perhaps it’s worth pointing out every tenth time one sees it, as a mater of politeness, demonstrating the assumption that the poster cares.

So my purpose was not to say “you monster” but “psst, you missed a spot”, and that’s how he seems to have taken it.

To me, “man” meaning “human” isn’t colloquial at all (except in the slangy sense of don’t have a cow, man) – in fact, it’s stilted at best.

* I checked his profile.

At this moment, the #1 post on my reddit front page is complaining that the people who complain about spelling or grammar errors... probably don't speak two languages. ie. Whilst fighting the good fight for gender-neutrality/spelling/grammar, please don't forget that some people (especially on the internet) might not have as a nuanced expression in English as you.

It's colloquial in the same sense that it's ok to say "the best man for the job"

"We were looking for the best for the job" .... and then go on to announce it's a woman. We don't have to be such prudes to be respectful of the other gender.

“The best man for the job” is an idiom. Even then, I don’t see any plausible advantage it has in most contexts over “the best person for the job”.

This isn’t meant as prudery. Would you develop that argument? I’m curious why I’m being downvoted and would like a chance to engage.

Honestly? It boils down to me thinking to myself "I could see me saying 'man' in this case too" with the knowledge that I am one of the most outspoken champions of women equality and rights in most sittings I'm in.. so I find it overkill to make a fuss about this, esp. in such an understandable context.

Oh go crawl back under your he-she-it rock, Randall Munroe.

Definitely. Just wanted to point it out.

Any chance of open-sourcing this? :)

vladev- Sure. It's on Github; Written in Python + Tornado. If you're interested, email me.

I'd rather clean it up, but if you're a Python guy, you could help ;)

URL please.

It's really not that ready for public consumption yet, but, I've added you to the project, and made it public.


Thanks :) Actually I asked just to have a look at how this is done. I'll surely help if I can.

I love this, simply because http://robohash.org/mattbearman kinda looks like me :D

My one criticism is that it took me while to figure out (and I'm web dev) It wasn't clear until quite far down the page that you need to just put the text string after the URL.

I'd recommend having a text box into which pasted text can be robohashed prominent on the homepage, as well as clearer instructions.

Edit: just noticed there is a text box, was that there before? It could definitely be more noticeable :)

I have added a box in the Last 5 minutes based on user-feedback. It's kinda a hack, but.. It's there ;)

Ah cool, its good to see you respond quickly to feedback

It's similar to the StackOverflow April Fools' Unicorn Avatars: http://meta.stackoverflow.com/questions/37328/my-godits-full...

Which you can try out at: http://unicornify.appspot.com/use-it

Woah, That's really cool! I hadn't seen that, but yes, it's designed to be along the same idea, except more year-round friendly ;)

You write really good web site copy.

Thank you, that's very kind of you to say. The whole project is very silly, so it doesn't make much sense to take it very seriously ;)

I'm impressed that you got an endorsement from Cave Johnson. It must be nice having friends like that.

To be fair, it was just a pre-recorded message.

It would be awesome if http://robohash.org/google.jpg generated a jpg, and http://robohash.org/google.png generated a png.

It would be even more awesome if http://robohash.org/favicon.ico generated a .ico file.

Google.jpg does generate a jpg, but it's not the same as google.png;

The reason for that is that I'm hashing whatever you send in, including the extension.. Otherwise, if you passed file.txt and file.mp3 they'd come to the same hash.

You could make an exception for .jpg and .png and only hash the part to the left of the dot otherwise hash the whole thing!

I realize what you're doing. This was more of a "really cool feature request" than a bug report.

favicon.ico does respond with a 404 though.

http://robohash.org/google.gif generated a .gif file!

OMG - π-bot has a cylindrical head! http://robohash.org/3.14159

Looks better than Tau-bot :)


They do have the same smile.

That's an awesome coincidence. Now I'll have to check for others ;)

So THIS is what the Googlebot looks like!


Bing just looks like a goofy hipster.


He's So friendly!

I think this is broken. I entered, "Bite my shiny, metal ass!" and all I got was some weird, Barney-like purple robot. I'd suggest special sub-routines for certain phrases including, but not limited to: "Ex-Ter-Mi-NATE!", "Danger, Will Robinson!", "Crush, Kill, Destroy!", "Beedeebeedeebeedeebeedee!", "We've got movie sign!", "Blah, blah, blah", "I'll be back", etc.


For 2.0, I'll add ?popculture=yes ;)

Hah, that'd be awesome! One of the first strings I tried was "bender". Considering how fast the image loaded, I'm guessing it was already cached from other users doing the same :)

I quickly made a bookmarklet to robotize HN usernames:

  javascript:(document.body.innerHTML=document.body.innerHTML.replace(/<a href="user\?id=([^"]+)">([^<]+)<\/a>/g,'<a href="user?id=$1"><img src="http://robohash.org/$2?size=24x24">$2</a>'))()

The Html source has a random robot as part of the author signature. This is neat!

Wow! Very nice morning treat :-)

R2D2 and C3P0 look like this:

http://robohash.org/c3p0.png http://robohash.org/r2d2.png

C3P0's got horns!!

I'm surprised no one's posted anything from set2 or set3, or included any backgrounds ;)

I find it pretty clever to generate Robot faces rather than whole robots or other pictures. Human brains are optimized for face recognition, which is why we can tell even minor differences in faces far easier than minor differences in other pictures.

Therefore, generating human faces would serve this purpose even better, but those are at risk of falling into the uncanny valley. (http://en.wikipedia.org/wiki/Uncanny_valley)

Using clearly non-human faces (such as Robot faces) avoids that problem.

This is brilliant.

We have a stress testing tool that uses little images of various robots in its UI to represent different test patterns ... now I can automate them!

What sort of "Super-Awesome new forum" is this for?

It has a problem with the current and parent directory links. (I don't know if it's possible to fix.)

http://robohash.org/. (doesn't work)

http://robohash.org/.. (doesn't work)

http://robohash.org/... (does work!)

Very very nice. This has convinced me to use this technique for non-player characters in a game I am working on. I see you licensed the artwork from three artists. Did you have it especially drawn for you, or was it already released under some CC license?

I had it drawn for the project at 99designs.

What was your design brief for this? The results are so cool, so should the brief.

An easy way to flip the images left and right would be great. I love the first set of robots, but I wouldn't use them in my website as they'd be placed on the far left of the browser window, looking away from the page.

If/when you debut the [robohash] watermark in the image, it would be great if you would also debut a paid plan without the watermark. Plus, paid plans give people confidence that your service will continue to exist.

I think it would be pretty silly to add a paid plan to a weekend project. ;)

I'll only do that, with the watermark, if it goes over what my bottom-rung Linode+CDN can deliver.

It's not silly for people who are actually using this. I'd rather pay for the service than living with the uncertainty of getting a banner because you can't pay your CDN bills. That's really the only thing that prohibits me from using this service in anything useful anyway. It looks very nice so that clearly would be a waste.

Download the source from github !

    Dr. Chandra, RobotCrunch
Subtle jab at Arrington? =)

The Testimonials, and the hover-text on the robots change on every reload. Try it! Hammer the site more ;)

The similarity between http://robohash.org/yes

and http://robohash.org/no

is striking.

there's something wrong with the algorithm, the yes guy looks like he's saying no

I love some of the alt-text on the robots. Very polished.

That was my favorite part. There are a few fun bits scattered around the webpage.

also the robots in the source code!

Strange. No matter WHAT STRING I ENTER, it ALWAYS creates the SAME robot. Is this site just a psychological experiment designed to collect user names??

Were you in Firefox, by chance? There was a difference in the FF evaluates the JS, versus Webkit, when retrieving document.form, so I switched it to getelementbyid.

Anyone else notice the Microsoft bot has a 7 (as in Windows 7) on its head?


I like it but shouldn't it do similarity instead of producing a unique bot? For example, "similar" strings should produce similar bots.

I'm generating the bots by reading the bits from a SHA1 hash, so they won't be very similar on an english-text level.

Usually, a hash function is explicitly designed to have very different output for similar input.

Sad to see Bender in this state: http://static1.robohash.com/bender

If I put a % anywhere in the string (except at the end where I think it is ignored) it doesn't give me my robot, but a broken link!

It's doing a URL decode to store them. I think that a % is not valid in a URL..

From http://www.w3.org/Addressing/URL/4_URI_Recommentations.html-

The percent sign ("%", ASCII 25 hex) is used as the escape character in the encoding scheme and is never allowed for anything else.

I'll try to see why it's not converting it after work.

Same problem with a string of just spaces. It seems the string being hashed isn't URL-encoded first.

this is cute. if anyone is looking for a more abstract approach i threw some code together a year ago that generates colourful "mosaics" - http://www.acooke.org/hash-icons.html (i really need to improve the page and release the code...)

I love the mosiacs; They remind me of a prettier version of identicons.

My concern was just that people won't remember a random pattern of dots very well.

yeah, i agree. on the other hand, they go smaller - i was looking for something that would label users on a feed of short comments.

Wow, this looks indeed way better than identicons. I'll email you to enquire about the code.

if you go to http://static1.robohash.com/ you get the same page as http://robohash.org/ but the IP used is not my IP.

nice project though. :)

Static1.robohash.com goes through the CDN.. If you load a PNG through there, it's cached. I wouldn't do the whole site through there, though, or you'll get the CDN's IP!

i figured it was something like that but i felt i should mention it just in case.

your concept did a good job in alerting me that the IP that was supposed to me mine was not :)

Any open/permissive license on the output and/or code?

CC BY 3.0 on the Images, BSD on the code.

Who should I attribute as the creator of the robot images? You, the website, or the author of the hashed plain-text?

Just attribute it to RoboHash.org, that should be fine.

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact