Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AGraph.Distance #24

Open
tylertownsend opened this issue Aug 30, 2019 · 2 comments
Open

AGraph.Distance #24

tylertownsend opened this issue Aug 30, 2019 · 2 comments

Comments

@tylertownsend
Copy link

tylertownsend commented Aug 30, 2019

The Distance function compares row-wise for each element to see if they match. However, how does this reflect to AGraphs with the same equation tree, but with different command arrays. For example let,

command_array_1 = [[LOADX, 0, 0],
                   [LOADX, 1, 1],
                   [LOADC, 0, 0],
                   [MULTI, 0, 2]]

and

command_array_2 = [[LOADX, 0, 0],
                   [LOADC, 0, 0],
                   [MULTI, 0, 1],
                   [LOADX, 1, 1]]

And distance(command_array_1, command_array_2) = 8 since the first row is the same, and the 0 in the 1st column-index of the 2nd row-index is in both arrays. However they both describe an equation f(x) = c_0 * x_0. Should the distance reflect the AGraphs or the command arrays?

@gbomarito
Copy link
Collaborator

Ideally distance is a measure of dissimilarity between the AGraphs. It was implemented in the current way mainly based on a need for fast evaluation. We could try a different (and likely slower) implementation and see if the reduction in evaluation speed is made up in quicker evolutionary convergence.

@gbomarito
Copy link
Collaborator

I just read a paper on alternative, hash-based distance metric:
https://arxiv.org/abs/1902.00882
this could be worth implementing and comparing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants