From 11c4f78bbd2dc86e85a71f163d6e95df138bd3e7 Mon Sep 17 00:00:00 2001 From: skkiesel Date: Wed, 7 Jun 2017 20:07:26 -0400 Subject: [PATCH] try to force the bridge command to give less deterministic results --- plugins/babbler/babbler.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/babbler/babbler.go b/plugins/babbler/babbler.go index cc6e408..582abbc 100644 --- a/plugins/babbler/babbler.go +++ b/plugins/babbler/babbler.go @@ -862,7 +862,7 @@ func (p *BabblerPlugin) babbleSeedBookends(babblerName string, start, end []stri closed := map[int64]*searchNode{ startWordNode.NodeId : open[0] } goalNodeId := int64(-1) - for i := 0; i < len(open) && i < 250; i++ { + for i := 0; i < len(open) && i < 1000; i++ { cur := open[i] arcs, err := p.getNextArcs(cur.babblerNodeId) @@ -880,7 +880,10 @@ func (p *BabblerPlugin) babbleSeedBookends(babblerName string, start, end []stri if arc.ToNodeId == endWordNode.NodeId { goalNodeId = cur.babblerNodeId - break + //add a little randomization in through maybe searching beyond this solution? + if rand.Intn(4) == 0 { + break + } } } }