[quiz] [QUIZ #1] A Text-based CAPTCHA

Marco Baringer mb at bese.it
Fri Apr 28 12:43:02 UTC 2006


A Text-based CAPTCHA
--------------------

Overview
========

A CAPTCHA (Completely Automated Public Turing test to tell Computers
and Humans Apart) is something designed to make it easy to distinguish
between a computer and person, they are most often used in blog and
web forum systems to fight spamming. A CAPTCHA can be viewed as a
challenge/response system meeting the following criteria:

1) It must be easy for a computer to generate question/answer pairs.

1b) It must also be easy to verify that some textual input is equal to
    the answer.

2) It must be easy for a person to generate the answer given the
   question.

3) It must be hard for a computer to generate the answer given the
   question.

The most common kind of CAPTCHA is an image containing a set of
numbers which have been somehow distorted, it is (supposedly) easy for
a person to figure what numbers are in the image and very difficult
for a computer to do the same. Images do work great as CAPTCHAs, but
they have a major drawback: it's basically impossible for people with
sight problems to answer the CAPTCHA.

Goal
====

The goal of this quiz is to write a function which produces textual
CAPTCHAs and therefore works well with screen readers and text
browsers. To do this we're going to rely on two observations: 1)
computers can be taught to generate natural-language text but they're
notoriously bad at understanding it and 2) humans are pretty good at
simple arithmetic.

Write a function named cl-user::generate-captach with the following
interface:

    (cl-user::generate-captcha) ==> question, answer

    question - a string
    answer - a string

QUESTION should be a string of English text asking to perform some
simple arithmetic. It is not essential that QUESTION be perfect
English, only that a person, after reading QUESTION can easily deduce,
and type, ANSWER.

Here are same (completely made up) examples:

    (cl-user::generate-captcha)
    ==> "what is one times 2?", "2"

    (cl-user::generate-captcha)
    ==> "start with three apples, eat 2 of them, how mny r lft?", "1"

    (cl-user::generate-captcha)
    ==> "go buy 3 apples, sell them all, how many are left?", "0"

Bonus Questions
===============

1) Write a generator which produces Latin output.

2) Write a captcha-cracker for one of the solutions to this quiz.

3) Write a completly different text based captcha.

Useful Links
=============

http://www.captcha.net/
http://en.wikipedia.org/wiki/Captcha
http://www.w3.org/TR/turingtest/

p.s. - this is the first cl-quiz, comments/suggestions welcome.

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen



More information about the Quiz mailing list