![JAR search and dependency download from the Maven repository](/logo.png)
internal.IllegalCostException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ai Show documentation
Show all versions of ai Show documentation
AI libraries dealing primarily with Goal Oriented Action Planning
The newest version!
package com.gracefulcode.ai.internal;
import com.gracefulcode.ai.Behavior;
import java.lang.Exception;
/**
* Weird things happen if your behavior ever returns a cost of <= 0. The
* planner decides that doing this action takes no time/effort/etc, so why not
* just do *nothing else*? Since there's no valid reason to do this, catch it
* and throw an Exception!
*
* @version 0.1
* @since 0.1
*/
public class IllegalCostException extends Exception {
public Behavior behavior;
public Float cost;
public IllegalCostException(Behavior behavior, Float cost) {
super("A behavior has an illegal cost.");
this.behavior = behavior;
this.cost = cost;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy