<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/hunt-and-kill-algorithm-k3cbspvco" -->

---
title: Hunt and Kill Algorithm | daily.dev
description: Hunt and Kill Algorithm is a maze generation algorithm.  Kill: Start carving a path from the current cell, randomly moving to unvisited neighbors. Hunt: When...
canonical: https://daily.dev/posts/hunt-and-kill-algorithm-k3cbspvco
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Hunt and Kill Algorithm | daily.dev
og:description: Hunt and Kill Algorithm is a maze generation algorithm.  Kill: Start carving a path from the current cell, randomly moving to unvisited neighbors. Hunt: When...
og:url: https://daily.dev/posts/hunt-and-kill-algorithm-k3cbspvco
og:image: https://api.daily.dev/og/posts/k3CBspVco.png
og:image:alt: Hunt and Kill Algorithm
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Hunt and Kill Algorithm

**[YouTube](https://daily.dev/sources/youtube)** · 1 min read · 0 upvotes · 0 comments

## Summary

Hunt and Kill Algorithm is a maze generation algorithm.

Kill: Start carving a path from the current cell, randomly moving to unvisited neighbors.
Hunt: When you get stuck, scan the maze for an unvisited cell next to a visited cell, then connect them.
Repeat until every cell has been visited.

#python #computerscience #javascript

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=z4oqFWXf4rY>

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#python](https://daily.dev/tags/python)

[View this post on daily.dev](https://daily.dev/posts/hunt-and-kill-algorithm-k3cbspvco)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Hunt and Kill Algorithm","url":"https://daily.dev/posts/hunt-and-kill-algorithm-k3cbspvco","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/hunt-and-kill-algorithm-k3cbspvco"},"datePublished":"2026-09-18T20:55:55.013Z","dateModified":"2026-09-18T22:42:52.315Z","description":"Hunt and Kill Algorithm is a maze generation algorithm.\n\nKill: Start carving a path from the current cell, randomly moving to unvisited neighbors.\nHunt: When...","image":"https://i.ytimg.com/vi/z4oqFWXf4rY/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/z4oqFWXf4rY/sddefault.jpg","isAccessibleForFree":true,"articleSection":"YouTube","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"YouTube","logo":"https://media.daily.dev/image/upload/s--W5zMumpP--/f_auto/v1725350181/logos/youtube","url":"https://daily.dev/sources/youtube"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/hunt-and-kill-algorithm-k3cbspvco","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript,python","timeRequired":"PT1M","video":{"@type":"VideoObject","name":"Hunt and Kill Algorithm","description":"Hunt and Kill Algorithm is a maze generation algorithm.\n\nKill: Start carving a path from the current cell, randomly moving to unvisited neighbors.\nHunt: When...","thumbnailUrl":"https://i.ytimg.com/vi/z4oqFWXf4rY/sddefault.jpg","uploadDate":"2026-09-18T20:55:55.013Z","duration":"PT1M","url":"https://api.daily.dev/r/k3CBspVco","embedUrl":"https://www.youtube.com/embed/z4oqFWXf4rY"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"YouTube","item":"https://daily.dev/sources/youtube"},{"@type":"ListItem","position":3,"name":"Hunt and Kill Algorithm"}]}
```

