KnowledgeBase
{
InputVariable SENSORLEFT [0, 2000]
{
LShoulder (vnear, 20, 40)
Triangular (near, 10, 55, 100)
Triangular (medium, 60, 100, 140)
Triangular (far, 120, 150, 180)
RShoulder (vfar, 160, 170)
}
InputVariable SENSORMIDDLE [0, 2000]
{
LShoulder (vnear, 20, 40)
Triangular (near, 10, 55, 100)
Triangular (medium, 60, 100, 140)
Triangular (far, 120, 150, 180)
RShoulder (vfar, 160, 170)
}
InputVariable SENSORRIGHT [0, 2000]
{
LShoulder (vnear, 20, 40)
Triangular (near, 10, 55, 100)
Triangular (medium, 60, 100, 140)
Triangular (far, 120, 150, 180)
RShoulder (vfar, 160, 170)
}
OutputVariable VELOCITYANGULAR [-0.4, 0.4]
{
LShoulder ( Bignegative, -0.3, -0.2)
Triangular ( negative, -0.3, -0.2, -0.1)
Triangular ( Smallnegative, -0.2, -0.1, 0)
Triangular ( NoChange, -0.1, 0, 0.1)
Triangular ( Smallpositive, 0, 0.1, 0.2)
Triangular ( positive, 0.1, 0.2, 0.3)
RShoulder ( Bigpositive, 0.2, 0.3)
}
OutputVariable VELOCITYLINEAR [-0.1, 5]
{
LShoulder (Reverse, -1, 0)
Triangular (Stop, -0.1, 0, 0.1)
Triangular (Slow, 0, 0.3, 0.6)
Triangular (Medium, 0.3, 0.6, 0.9)
RShoulder (Fast, 0.6, 5)
}
}
Predicates
{
}
RuleBase
{
If SENSORLEFT is vfar and SENSORRIGHT is vfar Then VELOCITYANGULAR is nochange and VELOCITYLINEAR is fast
If SENSORLEFT is vfar and SENSORRIGHT is far Then VELOCITYANGULAR is nochange and VELOCITYLINEAR is fast
If SENSORLEFT is vfar and SENSORRIGHT is medium Then VELOCITYANGULAR is nochange and VELOCITYLINEAR is fast
If SENSORLEFT is vfar and SENSORRIGHT is near Then VELOCITYANGULAR is smallnegative and VELOCITYLINEAR is medium
If SENSORLEFT is vfar and SENSORRIGHT is vnear Then VELOCITYANGULAR is bignegative and VELOCITYLINEAR is stop
If SENSORLEFT is far and SENSORRIGHT is vfar Then VELOCITYANGULAR is nochange and VELOCITYLINEAR is fast
If SENSORLEFT is far and SENSORRIGHT is far Then VELOCITYANGULAR is nochange and VELOCITYLINEAR is fast
If SENSORLEFT is far and sensorright is medium Then VELOCITYANGULAR is nochange and VELOCITYLINEAR is fast
If SENSORLEFT is far and sensorright is near Then VELOCITYANGULAR is smallnegative and VELOCITYLINEAR is medium
If SENSORLEFT is far and sensorright is vnear Then VELOCITYANGULAR is negative and VELOCITYLINEAR is stop
If SENSORLEFT is medium and sensorright is vfar Then VELOCITYANGULAR is nochange and VELOCITYLINEAR is fast
If SENSORLEFT is medium and sensorright is far Then VELOCITYANGULAR is nochange and VELOCITYLINEAR is fast
If SENSORLEFT is medium and sensorright is medium Then VELOCITYANGULAR is nochange and VELOCITYLINEAR is fast
If SENSORLEFT is medium and sensorright is near Then VELOCITYANGULAR is smallnegative and VELOCITYLINEAR is medium
If SENSORLEFT is medium and sensorright is vnear Then VELOCITYANGULAR is smallnegative and VELOCITYLINEAR is stop
If SENSORLEFT is near and sensorright is vfar Then VELOCITYANGULAR is smallpositive and VELOCITYLINEAR is medium
If SENSORLEFT is near and sensorright is far Then VELOCITYANGULAR is smallpositive and VELOCITYLINEAR is medium
If SENSORLEFT is near and sensorright is medium Then VELOCITYANGULAR is smallpositive and VELOCITYLINEAR is medium
If SENSORLEFT is near and sensorright is near Then VELOCITYANGULAR is nochange and VELOCITYLINEAR is medium
If SENSORLEFT is near and sensorright is vnear Then VELOCITYANGULAR is smallnegative and VELOCITYLINEAR is stop
If SENSORLEFT is vnear and sensorright is vfar Then VELOCITYANGULAR is bigpositive and VELOCITYLINEAR is stop
If SENSORLEFT is vnear and sensorright is far Then VELOCITYANGULAR is positive and VELOCITYLINEAR is stop
If SENSORLEFT is vnear and sensorright is medium Then VELOCITYANGULAR is positive and VELOCITYLINEAR is stop
If SENSORLEFT is vnear and sensorright is near Then VELOCITYANGULAR is smallpositive and VELOCITYLINEAR is stop
If SENSORLEFT is vnear and sensorright is vnear Then VELOCITYANGULAR is nochange and VELOCITYLINEAR is reverse
If SENSORMIDDLE is near Then VELOCITYLINEAR is stop
If SENSORMIDDLE is vnear Then VELOCITYLINEAR is stop
}