From e9af781c7bc05342b90c91b20f274c705fbc9e03 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Thu, 13 May 2010 14:18:44 +0200 Subject: digital/io/src: tune scores --- digital/io/src/food.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'digital/io') diff --git a/digital/io/src/food.c b/digital/io/src/food.c index 332b46f8..87c44b41 100644 --- a/digital/io/src/food.c +++ b/digital/io/src/food.c @@ -166,7 +166,7 @@ food_score (position_t robot_pos, uint8_t food) if (food_table[food].type == FOOD_TYPE_TOMATO) score += 100; else - score -= 1000; + score -= 4000; /* Distance to robot. */ food_pos (food, &v); int32_t dr = distance_point_point (&v, &robot_pos.v); @@ -182,8 +182,10 @@ food_score (position_t robot_pos, uint8_t food) } /* Distance to unloading area. */ /* Avoid food near border. */ + if (food == 15 || food == 1) + score -= 300; if (v.y < BOT_SIZE_RADIUS) - score -= 2000; + score -= 6000; /* Done. */ return score; } -- cgit v1.2.3