Beispiel #1
0
        // Determine the placement of the condition
        public static PointF PickLocation(ManInWorld world, bool movingCondition, SizeF size)
        {
            if (movingCondition)
            {
                return(world.RandomPositionInsidePowNonCovering(m_rand, size, 1, 40));
            }

            const int  FIXED_OFFSET = 10;
            RectangleF powRectangle = world.GetPowGeometry();

            return(new PointF(powRectangle.X + FIXED_OFFSET, powRectangle.Y + FIXED_OFFSET));
        }
Beispiel #2
0
 // Determine the placement of the target
 public static PointF PickLocation(ManInWorld world, SizeF size /*, int degreesOfFreedom */)
 {
     // TODO Currently, degrees of freedom is not taken into account
     // And distance to target is the same throughout the learning task
     return(world.RandomPositionInsidePowNonCovering(m_rand, size, 10, 22));
 }