kri5t0fk / souvlakisearch Goto Github PK
View Code? Open in Web Editor NEWApp for searching places with Souvlaki (or anything). Basically Chinese Postman Problem
License: MIT License
App for searching places with Souvlaki (or anything). Basically Chinese Postman Problem
License: MIT License
For
unvisitedVertices
I'd suggest using PriorityQueue<TElement, TPriority> instead of looking for nearest vertex manually.PriorityQueue<indexT, edgeWeightT(minCostToVertex)> unvisitedVertices = new PriorityQueue<indexT, edgeWeightT(minCostToVertex)>();
Originally posted by @Kri5t0fK in #21 (comment)
On push
es, PR
s:
We need to have public access for this class for purpose of unit tests. If this class is not supposed to be tested, then you can leave it as is and close this issue.
input:
$[ABCDEF]$ (vector of vertices),
$i, j = 2, 5$ ,
$[AB\fbox{C}DE\fbox{F}]$ - before swap,
$[AB\fbox{F}DE\fbox{C}]$ - after swap,
return$[ABFDEC]$ ,
pairs
of Parentscrossover
(suggestion below)P1->C1
, P2->C2
):other
Parent (P1->C2
, P2->C1
):exchange-pairs
from [2.] crossover segment:recursively
, until you get vertex
that wasn't in child yet.DEF->GDA => D->G, E->D, F->A
GDA->DEF => G->D, D->E, A->F
collision
-> vertices in boxes need changing:E->D->G
; F: F->A
A->F
; G: G->D->E
Maybe also add get() for entire List _oddVertices
?
SouvlakiSearch/SouvlakMVP/SouvlakMVP/Genotype.cs
Lines 25 to 35 in 1560793
Run it parallelly when used to calculate odd pairs's distances.
Rename fields of Map class to better suit mathematical conventions. For example change:
Main GA (Genetic Algorithm) Issue - other link to that one.
Currently genotype stores a list of vertices. This isn't necessarily a bad way to store data, but it is far from being space efficient - every Vertex contains both Vector2 holding position on screen and a full list of Edge objects. Therefore I'd suggest, that Genotype stores a list of indices instead, and gets all Vertex info from the reference to the original Graf object.
PLEASE make those changes on GA-algorithm-dev branch, cause I dont want to jump over three different branches, just to check for potential merges every time I open Visual Studio
Genotype consists of 2n
(even number) of Odd Vertexes
(road crossings):
list of vertexes
in any order:only once
list
of odd vertices
: size
of PopulationPopulation
(#17): list/set of Solutions
Solution
: odd vertices in random order
Input:
odd vertices
=$[ABCDEF]$ ,pop_size
=4,
Return:$\{[FBACDE], [CDABFE], [EABCFD], [BFCEDA]\}$
Calculate Dijkstra (#6) for every pair
in solution-vector and sum all costs
:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.