Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Sam Gwydir
@gwydirsam
this runs slower for and test, and only a little faster for XOR
Vincent Valenti
@vincentv18
:: ./build/eugenics/test-jv_algorithm
Running main() from gtest_main.cc
[==========] Running 4 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 4 tests from JVAlgorithmTest
[ RUN      ] JVAlgorithmTest.EmptyTest
[       OK ] JVAlgorithmTest.EmptyTest (34 ms)
[ RUN      ] JVAlgorithmTest.ANDTest
[       OK ] JVAlgorithmTest.ANDTest (1095 ms)
[ RUN      ] JVAlgorithmTest.XORTest
[       OK ] JVAlgorithmTest.XORTest (63309 ms)
[ RUN      ] JVAlgorithmTest.FullAdderTest
jeregoorlino
@jeregoorlino
what numbers did you get?
Vincent Valenti
@vincentv18
There is a difference between "ANDMatch" and "ANDTest"
its two separate tests
Sam Gwydir
@gwydirsam
what is get_eval for?
Vincent Valenti
@vincentv18
so i can keep track of the output of the circuit so i dont have to call evaluateAllInputs
just to make it a little faster
Sam Gwydir
@gwydirsam
That will not make it faster if I understand correctly
Vincent Valenti
@vincentv18
evaluateAllInputs function generates the entire input set and runs a lot of comparisons. So i wanted to eliminate that cause I was calling that when I was comparing the next circuits output to the current circuits outputs stored in a vector.
Christopher Findeisen
@Atrus7
Why did you get rid of queue?
Vincent Valenti
@vincentv18
"if (next.get_eval() == ex_list[j].geteval()" used to be "if (next.evaluateAllInputs() == ex_list[j].evaluateAllIputs()"
i figured a vector would be easier to iterate through
Christopher Findeisen
@Atrus7
Right, but a queue was being used for BFS, not for storing unique outputs.
I don't mean to tell you you're wrong, but just letting you know, that was the reason for a queue.
Vincent Valenti
@vincentv18
my vector is being used in the same context as the queue was. Its just a way of storing the circuits so i don't it should matter that much
to be clear, we haven't figured out how to find a "unique" output. we just essentially eliminate duplicate circuits that have the same output
Christopher Findeisen
@Atrus7
Hey, team JV, would you like to Skype with Sam and I real quick to go over any questions you might have, or would you rather just have space to work?
jeregoorlino
@jeregoorlino
yeah let's skype.
jeregoorlino
@jeregoorlino
sam/chris, can i give one of you guys a call real quick. i have a question about your suggestion about having a vector that stores all of the previous outputs.
Sam Gwydir
@gwydirsam
Can you write it?
jeregoorlino
@jeregoorlino
okay
Sam Gwydir
@gwydirsam
We're pairing
jeregoorlino
@jeregoorlino
I'm not sure if we need a vector that stores the previous outputs because at each level, after we generate a new set of permutations that we need, the outputs will change. The way we have our code set up now, is that we evaluate the output of each new permutation one at a time, and compare it to every output of every circuit in the vector. If it doesn't match, then we add it in and move onto the next permutation and do the same thing that way we don't get any duplicates. So i'm not sure where we'd need the outputs of circuits already deleted because it'll change with each permutation that we add.
Sam Gwydir
@gwydirsam
Your vector of output sets keeps the unique output sets. Thats what you check to see if your next circuit's output set is unique.
Christopher Findeisen
@Atrus7
Just clarifying your use of "outputs". Output sets are the things you should compare..That is the three output columns, all together. So if two output columns in A and B are the same, but the other output columns are different, the output sets are different. Make sense?
jeregoorlino
@jeregoorlino
yeah i understand that chris. and thanks sam that makes sense
Christopher Findeisen
@Atrus7
Just an example of two inequal ouput sets
-------A------           != -----------B--------------
1 1 1                                1 1 0
0 0 0                                 0 0 1
1 1 0                                 1 1 0
0 0 0                                 0 0 0
jeregoorlino
@jeregoorlino
yeah thats how i visualized it in my head
Christopher Findeisen
@Atrus7
kk
jeregoorlino
@jeregoorlino
i just came up with an idea and i wanted to run it by you guys first and see what you think. since we're gonna compare the columns, column by column, if at any point, we get a column to match, we need to map that with chris's function and then only start generating circuits from that circuit in which we mapped something.
Sam Gwydir
@gwydirsam
not necessarily and probably not.
also do you guys check if you've used more than two nots?
also -- have a way to print your final circuit
so you can test it
jeregoorlino
@jeregoorlino
why wouldn't we do that though? because say one permutation at level 4, we match one of the output columns, the other relative permutations at that level won't have a matching column at that level, so it'll reduce the amount of circuits we have to populate because we just have to populate the one at level 4 that has a matching column.
and damnit, we're doing that right now.
we completely forgot about that.
Sam Gwydir
@gwydirsam
because just because you have one matching column doesn't necessarily mean that branch will contain a permutation that has all the rest
jeregoorlino
@jeregoorlino
okay. just running it by then. thanks.
Vincent Valenti
@vincentv18
I think generating the mapGatetoOutput correctly but can yall explain what the desired output index would be?
I think gate_index would be equal to getGateCount() - 1, right?
Vincent Valenti
@vincentv18
nevermind i think i understand
Sam Gwydir
@gwydirsam
why is it less than 3 not gates?
not <= 2
Sam Gwydir
@gwydirsam
If you guys are around
get that -A -B -C test in there
jeregoorlino
@jeregoorlino
its there now sam. and wouldn't < 3 be logically the same as <= 2?
Sam Gwydir
@gwydirsam
of course. and so is <= ( 8 % 2) but it's clearer from the spec
Sam Gwydir
@gwydirsam
Hey just so you guys know, if you add good debug logging and still can figure out the problems by the time Chris and I get around to it -- but we figure it out from the debug logs and don't have to start from scratch it won't hurt nearly as much. Also I'd bet if you have good debug logging you figure it out