All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.unibo.jakta.agents.bdi.goals.impl.UpdateBeliefImpl.kt Maven / Gradle / Ivy

There is a newer version: 0.11.102
Show newest version
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