GithubHelp home page GithubHelp logo

erikoui / genetic_architect Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 54 KB

Genetic algorithm that should produce floor plans and arrangements. Probably will never work properly.

License: MIT License

C 34.00% C++ 66.00%

genetic_architect's Introduction

Genetic_Architect

Genetic algorithm that should produce floor plans and arrangements. Probably will never work properly.

How it works

The main idea is

  1. generate random genomes (generation)
  2. score them according to soft constraints (fitness)
  3. choose genomes with probability proportional to its scores
  4. combine chosen genomes into a new population (crossover)
  5. mutate some genes (mutation)
  6. repeat from 2

Compile

g++ -o ga.o main.cpp -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs

Glossary

  • Genome: The representation of the floor plan in memory. Consists of many genes
  • Gene: The representation of a space(room/walkway etc) in the genome.
  • Score: How good a genome is according to the soft constraints. Bigger is better (or so I've heard).
  • Soft constraints: The things that are used to score a genome. For example
    • Distance between room and bathroom
    • Distance between kitchen and living room
    • Wasted area for walkways
    • etc.
  • Hard constraints: The things that make a genome acceptable or not. Failing to pass a hard constraint implies a score of 0.
    • Plot limits
    • Access to rooms
    • Minimum dimensions

Known bugs

  • haha yes

Requirements

OpenCV > 2.0

genetic_architect's People

Contributors

erikoui avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.