Gabriel Duncan
10/16/2025, 4:39 PMedge(nodeStart forwardTo identifyProblem)
edge(identifyProblem forwardTo fixProblem onCondition { problem -> !problem.resolved })
edge(identifyProblem forwardTo nodeFinish onCondition { it.resolved } transformed { it.emptyUpdate() })
edge(identifyProblem forwardTo fixProblem)
edge(fixProblem forwardTo verifySolution)
edge(verifySolution forwardTo nodeFinish onCondition { it.successful } transformed { it.input })
edge(verifySolution forwardTo adjust onCondition { !it.successful } transformed { it.feedback })
edge(adjust forwardTo verifySolution)
one thing that isn't clear to me is why identifyProblem goes to fixProblem both with and without a condition. if it forwards to fixProblem without a condition, doesn't that make the condition redundant?Gabriel Duncan
10/16/2025, 4:50 PMVadim Briliantov
10/16/2025, 5:00 PMVadim Briliantov
10/16/2025, 5:01 PMGabriel Duncan
10/16/2025, 5:03 PMGabriel Duncan
10/16/2025, 5:06 PMedge(someEdge when { result.x -> anotherEdge; result.y -> yetAnotherEdge; else -> terminalEdge })
just thinking out loud...Vadim Briliantov
10/16/2025, 5:09 PMedge(a forwardTo b onCondition { f(it) })
edge(a forwardTo c onCondition { !f(it) })
but you can also write:
edge(a forwardTo b onCondition { f(it) })
edge(a forwardTo c)
That is equivalent in practice.
It’s actually a hacky way because it abuses the internal implementation (every condition is being checked in the order they were defined for the current node “a”). But I wanted to save the screen space on my slides :)Vadim Briliantov
10/16/2025, 5:11 PMGabriel Duncan
10/16/2025, 5:15 PMKonstantin
10/16/2025, 8:01 PMGabriel Duncan
10/16/2025, 10:55 PMedge(identifyProblem forwardTo fixProblem onCondition { problem -> !problem.resolved })
edge(identifyProblem forwardTo nodeFinish onCondition { it.resolved } transformed { it.emptyUpdate() })
edge(identifyProblem forwardTo fixProblem)
wouldn't the same thing happen with
edge(identifyProblem forwardTo nodeFinish onCondition { it.resolved } transformed { it.emptyUpdate() })
edge(identifyProblem forwardTo fixProblem)Gabriel Duncan
10/16/2025, 11:00 PM