Added functionality for Steal/Donate instructions to HealthHosts - #251
Conversation
…ce it is technically testing CheckOutput which is called by SGPWorld
| Add("SharedIO"); | ||
| } | ||
|
|
||
| void AddSteal(int steal_count){ |
There was a problem hiding this comment.
This name should make it clear what the overall phenotype is since it's more than just adding a single steal instruction. And what is it actually doing since it has steal and donate?
There was a problem hiding this comment.
Ah, I kind of actually forgot that this would be added to the pull request automatically on pushing. This was my current rusty implementation of placing steals throughout the genome. For some reason it was not letting me add nop inbetween, I was planning on asking about that in the slack today but it slipped my mind. I used donate because currently in my tests unless ALLOW_TRANSITION is on donate will do nothing.
…de, still working on replacing donate with nop however
…ulationEmp into complex-syms-clean
|
Looks like this has an error in the tests |
|
|
||
| } | ||
|
|
||
| //This sequence checks if the symbiont will recieve a cycle, if it has not then it checks if |
|
|
||
| SGPWorld world(random, &config, LogicTasks); | ||
|
|
||
| //Builds program that does both NOT and NAND operations |
There was a problem hiding this comment.
These are places where you could use the "GIVEN" catch command
| host_baby->AddSymbiont(sym_baby); | ||
|
|
||
| WHEN("Host and Symbiont have both performed NOT"){ | ||
| host->GetCPU().state.tasks_performed->Set(0); |
There was a problem hiding this comment.
But it's setting tasks_performed to 0?
There was a problem hiding this comment.
If you are referring to line 109 I believe that Set(0) does not set tasks_performed to 0 but instead sets the 0th task (NOT) to 1.
anyaevostinar
left a comment
There was a problem hiding this comment.
A few things to change, good progress!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## complex-syms-clean #251 +/- ##
======================================================
+ Coverage 85.91% 86.31% +0.40%
======================================================
Files 144 145 +1
Lines 11231 11713 +482
Branches 120 120
======================================================
+ Hits 9649 10110 +461
- Misses 1548 1569 +21
Partials 34 34 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ulationEmp into steal_instructions
| emp::Ptr<SGPSymbiont> sym = emp::NewPtr<SGPSymbiont>(&random, &world, &config, CreateNotProgram(100)); | ||
|
|
||
|
|
||
| emp::Ptr<SGPSymbiont> sym_baby = emp::NewPtr<SGPSymbiont>(&random, &world, &config, CreateNotProgram(100)); |
There was a problem hiding this comment.
It doesn't look like you use the babies in this test so you should not make them
0b0a6b1
into
anyaevostinar:complex-syms-clean
Additionally added tests for these new instructions to HealthHost.test.cc