How can you escape from a maze – and what does that teach us about city planning?

“Sorry, we live here now”. Image: Getty.

Mazes are in vogue at the moment, from HBO’s Westworld, to the return of the British cult gameshow, The Crystal Maze. But mazes have been around for millennia and one of the most famous mazes, the Labyrinth home of the Minotaur, plays a starring role in Greek mythology.

Which begs the question: what is the difference between a maze and a labyrinth? Although considered synonymous by some, it is generally accepted that a labyrinth contains only one path, often spiralling around and folding back on itself, in ever-decreasing loops, whereas a maze contains branching paths, presenting the explorer with choices and the potential for getting very, very lost.

While designing a maze can be a rewarding human task, computer scientists and mathematicians have a love of maze-generating algorithms. The algorithms tend to fall into two principal types: ones which start with a single, bounded space and then sub-divide it with walls (and doors) to produce ever smaller sub-spaces; and others which start with with a world full of disconnected rooms and then demolish walls to create paths/routes between them.

The great escape

There are techniques for escaping from mazes, but first you need to be sure what kind of maze it is. Most methods work for “simple” mazes, that is, ones with no sneaky short-cuts via bridges or “passage loops” – circular paths that lead back to where they started.

So, assuming it is a simple maze, the method that many people know is “wall-following”. Essentially, you place one hand on a wall of the maze (it doesn’t matter which hand as long as you are consistent) and then keep walking, maintaining contact between your hand and the wall. Eventually, you will get out. This is because if you imagine picking up the wall of a maze and stretching its perimeter to remove any corners, you will eventually form something circle-like, part of which must form part of the maze’s outer boundary. This method of escape may not work, however, if the start or finish locations are in the maze’s centre.

But some mazes are deliberately designed to frustrate, such as the Escot Gardens’ beech hedge maze in Devon, which contains no fewer than five bridges, and so far from “simple”.

Another method of maze escape, known as Trémaux’s algorithm, works in all cases.

Imagine that, like Hansel and Gretel in the fairy story, you are able to leave a trail of “breadcrumbs” behind you as you navigate your way through the maze and then remember these rules: if you arrive at a junction you have not previously encountered (there will be no crumbs already on the trail ahead), then randomly select a way to go. If that leads you to a junction where one path is new to you but the other is not, then select the unexplored path. And if choosing between a once or twice-used path, choose the path used once, then leave a new, second trail behind you. The cardinal rule is never, ever select a path already containing two trails. This method is guaranteed, eventually, to get you out of any maze.

Everyday mazes

So how is any of this maze stuff useful? Well, from the perspective of architecture and urban design, we want to avoid accidentally creating mazes. Mazes are fun, but are not necessarily something we want in our everyday lives – or in our way when we just want to get to work.

In the 1980s, the architectural theorist, Bill Hillier, observed that many of the most socially problematic housing estates were those that appeared to be somewhat “maze-like” in their layout. This begged the theoretical question: how do we actually measure the “maze-iness” of a place?

Barnsbury, in London: extremely unmaze-like. Image: Google Maps.

To answer this, Hillier developed the measure of “intelligibility”, which is the relationship between what is immediately visible from a single location in a maze/housing estate/neighbourhood and how accessible that same place is from other locations in the area. The measure ranges from 0 to 1: environments that score highly (greater than 0.5) tend to be quite intelligible, easy to understand and navigate, and frequently desirable – for example Barnsbury, in London.

Conversely, places with a low intelligibility score tend to be confusing, hard to navigate and, ultimately, maze-like – London’s Barbican Estate, although architecturally lauded, is so confusing that visitors need to follow the yellow lines in order to find their way around.

It was this measure of intelligibility that we used to design the game levels in the recent SeaHeroQuest game, a game designed to measure people’s navigational skills in order to further dementia research.

We “reverse-engineered” intelligibility in order to produce game levels that were more, or less, maze-like, to ensure a range of challenges for the players. So the mathematics of maze design is just as applicable in modern, dementia-battling apps as it was in distant Greek mythology.The Conversation

Ruth Dalton is professor of building usability and visualisation, and Nick Dalton a lecturer in computing and communications, at Northumbria University, Newcastle.

This article was originally published on The Conversation. Read the original article.


A nation that doesn’t officially exist: on Somaliland’s campaign to build a national library in Hargeisa

The Somaliland National Library, Hargeisa. Image: Ahmed Elmi.

For seven years now, there’s been a fundraising campaign underway to build a new national library in a nation that doesn’t officially exist. 

Since 2010, the Somali diaspora have been sending money, to pay for construction of the new building in the capital, Hargeisa. In a video promoting the project, the British journalist Rageeh Omar, who was born in Mogadishu to a Hargeisa family, said it would be... 

“ of the most important institutions and reference points for all Somalilanders. I hope it sets a benchmark in terms of when a country decides to do something for itself, for the greater good, for learning and for progress – that anything can be achieved.”

Now the first storey of the Somaliland National Library is largely complete. The next step is to fill it with books. The diaspora has been sending those, too.


Some background is necessary here to explain the “country that doesn’t exist” part. During the Scramble for Africa of the 1880s, at the height of European imperialism, several different empires established protectorates in the Somali territories on the Horn of Africa. In 1883, the French took the port of Djibouti; the following year, the British grabbed the north coast, which looks out onto the Gulf of Aden. Five years after that, the Italians took the east coast, which faces the Indian Ocean.

And, excepting some uproar during World War II, so things remained for the next 70 years or so.

The Somali territories in 1890. Image: Ingoman/Wikimedia Commons.

When the winds of change arrived in 1960, the British and Italian portions agreed to unite as the Somali Republic: a hair-pin shaped territory, hugging the coast and surrounding Ethiopia on two sides. But British Somaliland gained its independence first: for just five days, at the end of June 1960, it was effectively an independent country. This will become important later.

(In case you are wondering what happened to the French bit, it voted to remain with France in a distinctly dodgy referendum. It later became independent as Djibouti in 1977.)

The new country, informally known as Somalia, had a difficult history: nine years of democracy ended in a coup, and were followed by the 22 year military dictatorship under the presidency of General Siad Barre. In 1991, under pressure from rebel groups including the Hargeisa-based Somali National Movement (SNM), Barre fled, and his government finally collapsed. So, in effect, did the country.

For one thing, it split in two, along the old colonial boundaries: the local authorities in the British portion, backed by the SNM, made a unilateral declaration of independence. In the formerly Italian south, though, things collapsed in a rather more literal sense: the territory centred on Mogadishu was devastated by the Somali civil war, which has killed around 500,000, displaced more than twice that, and is still officially going on.

Somalia (blue) and Somaliland (yellow) in 2016. Image: Nicolay Sidorov/Wikimedia Commons.

The north, meanwhile, got off relatively lightly: today it’s the democratic and moderately prosperous Republic of Somaliland. It claims to be the successor to the independent state of Somaliland, which existed for those five days in June 1960.

This hasn’t persuaded anybody, though, and today it’s the only de facto sovereign state that has never been recognised by a single UN member. Reading about it, one gets the distinct sense that this is because it’s basically doing okay, so its lack of diplomatic recognition has never risen up anyone’s priority list.

Neither has its library.

Rageeh Omar described the site of the new library in his fundraising video. It occupies 6,000m2 in the middle of Hargeisa, two minutes from the city’s main hospital, 10 from the presidential palace. In one sequence he stands on the half-completed building’s roof and points out the neighbours: the city’s main high street, with the country’s largest shopping mall; the Ministry of Telecoms that lies right next door.

This spiel, in a video produced by the project’s promoters, suggests something about the new library: that part of its job is to be another in this list of landmarks, more evidence that Hargeisa, a city of 1.5m, should be recognised as the proper capital of a real country.

But it isn’t just that: the description of the library’s function, in the government’s Strategic Plan 2013-2023, makes clear it’s also meant to be a real educational facility. NGOS, the report notes, have focused their resources on primary schools first, secondary schools second and other educational facilities not at all. (This makes sense, given that they want most bang for their buck.)

And so, the new building will provide “the normal functions of public library, but also... additional services that are intentionally aimed at solving the unique education problems of a post conflict society”. It’ll provide books for a network of library trucks, providing “book services” to the regions outside Hargeisa, and a “book dispersal and exchange system”, to provide books for schools and other educational facilities. There’ll even be a “Camel Library Caravan that will specifically aim at accessing the nomadic pastoralists in remote areas”.

All this, it’s hoped, will raise literacy levels, in English as well as the local languages of Arabic and Somali, and so boost the economy too.

As described. Image courtesy of Nimko Ali.

Ahmed Elmi, the London-based Somali who’s founder and director of the library campaign, says that the Somaliland government has invested $192,000 in the library. A further $97,000 came from individual and business donors in both Hargeisa and in the disaspora. “We had higher ambitions,” Elmi tells me, “but we had to humble our approach, since the last three years the country has been suffering from a large drought.”

Now the scheme is moving to its second phase: books, computers and printers, plus landscaping the gardens. This will cost another $175,000. “We are also open to donations of books, furniture and technology,” Emli says. “Or even someone with technical expertise who can help up set-up the librarian system instead of a contemporary donation of a cash sum.” The Czech government, in fact, has helped with the latter: it’s not offered financial support, but has offered to spend four weeks training two librarians.  

Inside the library.

On internet forums frequented by the Somali diaspora, a number of people have left comments about the best way to do this. One said he’d “donated all my old science and maths schoolbooks last year”. And then there’s this:

“At least 16 thousand landers get back to home every year, if everyone bring one book our children will have plenty of books to read. But we should make sure to not bring useless books such celebrity biography books or romantic novels. the kids should have plenty of science,maths and vocational books.”

Which is good advice for all of us, really.

Perhaps the pithiest description of the project comes from its Facebook page: “Africa always suffers food shortage, diseases, civil wars, corruption etc. – but the Somaliland people need a modern library to build a better place for the generations to come.”

The building doesn’t look like much: a squat concrete block, one storey-high. But there’s something about the idea of a country coming together like this to build something that’s rather moving. Books are better than sovereignty anyway.

Jonn Elledge is the editor of CityMetric. He is on Twitter as @jonnelledge and also has a Facebook page now for some reason. 

Want more of this stuff? Follow CityMetric on Twitter or Facebook.