This project generates non-intersecting convex polygons in n dimensions using a combination of Genetic Algorithm and Constraint Satisfaction Problem (CSP) techniques. The goal is to evolve a population of polygons that adhere to geometric constraints, ensuring non-intersecting, convex shapes.
- Non-intersecting Edges
- Convex Angles
- Create an initial population of polygons, each represented by a set of vertices in n dimensions. Initial vertices can be generated randomly or based on certain criteria.
- Define a fitness function that assesses how well a polygon meets the constraints. Higher fitness indicates better adherence to constraints.
- Select parent polygons based on their fitness scores. Higher fitness polygons are more likely to be selected as parents.
- Combine vertices of parent polygons to create offspring polygons. Crossover could involve swapping vertices or performing more complex operations based on problem requirements.
- Introduce small changes to vertices to maintain diversity. Mutation rates determine the probability of changes.
- Replace the old population with the new offspring population.
- Repeat selection, crossover, and mutation for a specified number of generations or until a satisfactory solution is found.
- Define geometric constraints for non-intersecting, convex polygons. Constraints include angles, side lengths, and bounding box dimensions.
- The search space consists of all possible sets of vertices that define a polygon. CSP techniques narrow down this space by enforcing constraints.
- Use CSP strategies to efficiently explore the search space. Backtracking and constraint propagation help identify valid solutions.
