it.unibo.jakta.agents.bdi.goals.impl.UpdateBeliefImpl.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jakta-bdi Show documentation
Show all versions of jakta-bdi Show documentation
A Kotlin internal DSL for the definition of BDI agents
package it.unibo.jakta.agents.bdi.goals.impl
import it.unibo.jakta.agents.bdi.beliefs.Belief
import it.unibo.jakta.agents.bdi.goals.Goal
import it.unibo.jakta.agents.bdi.goals.UpdateBelief
import it.unibo.tuprolog.core.Struct
import it.unibo.tuprolog.core.Substitution
internal class UpdateBeliefImpl(private val updatedBelief: Belief) : UpdateBelief {
override val value: Struct
get() = updatedBelief.rule.head
override fun applySubstitution(substitution: Substitution) =
UpdateBeliefImpl(updatedBelief.applySubstitution(substitution))
override fun toString(): String = "UpdateBelief($updatedBelief)"
override fun copy(value: Struct): Goal = UpdateBeliefImpl(Belief.from(value)) // TODO("QUI SI ROMPE")
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy