Package aima.core.agent.impl.aprog.simplerule

Examples of aima.core.agent.impl.aprog.simplerule.Rule.evaluate()


    Assert.assertEquals(false, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, false,
        ATTRIBUTE_CAR_IN_FRONT_TIRES_SMOKING, true)));

    Assert.assertEquals(false, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, true,
        ATTRIBUTE_CAR_IN_FRONT_TIRES_SMOKING, false)));
  }

  @Test
View Full Code Here


    Assert.assertEquals(
        "if [car-in-front-is-braking==true || car-in-front-tires-smoking==true] then Action[name==emergency-braking].",
        r.toString());

    Assert.assertEquals(true, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, true)));

    Assert.assertEquals(true, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_TIRES_SMOKING, true)));
View Full Code Here

        r.toString());

    Assert.assertEquals(true, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, true)));

    Assert.assertEquals(true, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_TIRES_SMOKING, true)));

    Assert.assertEquals(true, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, true,
        ATTRIBUTE_CAR_IN_FRONT_TIRES_SMOKING, true)));
View Full Code Here

        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, true)));

    Assert.assertEquals(true, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_TIRES_SMOKING, true)));

    Assert.assertEquals(true, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, true,
        ATTRIBUTE_CAR_IN_FRONT_TIRES_SMOKING, true)));

    Assert.assertEquals(true, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, false,
View Full Code Here

    Assert.assertEquals(true, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, true,
        ATTRIBUTE_CAR_IN_FRONT_TIRES_SMOKING, true)));

    Assert.assertEquals(true, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, false,
        ATTRIBUTE_CAR_IN_FRONT_TIRES_SMOKING, true)));

    Assert.assertEquals(true, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, true,
View Full Code Here

    Assert.assertEquals(true, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, false,
        ATTRIBUTE_CAR_IN_FRONT_TIRES_SMOKING, true)));

    Assert.assertEquals(true, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, true,
        ATTRIBUTE_CAR_IN_FRONT_TIRES_SMOKING, false)));

    Assert.assertEquals(false, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, false,
View Full Code Here

    Assert.assertEquals(true, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, true,
        ATTRIBUTE_CAR_IN_FRONT_TIRES_SMOKING, false)));

    Assert.assertEquals(false, r.evaluate(new DynamicPercept(
        ATTRIBUTE_CAR_IN_FRONT_IS_BRAKING, false,
        ATTRIBUTE_CAR_IN_FRONT_TIRES_SMOKING, false)));
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.