View Javadoc

1   package cz.cuni.amis.pogamut.udk.agent.module.sensor;
2   
3   import cz.cuni.amis.pogamut.udk.communication.messages.gbinfomessages.Item;
4   
5   /**
6    * Interface that allows you to define "usefulness of items". Note that the "usefulness" should depend on the current
7    * situation of the bot! That is - if the bot is almost dead, any health should be really useful.
8    * <p><p>
9    * Used by {@link AdvancedItems} to obtain current level of item's usefulness for the bot.
10   * <p><p>
11   * Note that it might be useful to define different item filters according to their type of usage (e.g.,
12   * different filter for weapons and health).
13   * 
14   * @author Jimmy
15   */
16  public interface IItemUsefulness {
17  
18  	/**
19  	 * Tells how much the item is useful to the bot - must return values between 0 and 1 (inclusive).
20  	 * 
21  	 * @param advancedItems
22  	 * @param item
23  	 * @param usefulness degree of usefulness, 0 - return also useless, 1 - return only <b>really truly</b> useful items which are MUST HAVE!
24  	 * @return usefulness of 'item'
25  	 */
26  	public double getItemUsefulness(AdvancedItems advancedItems, Items items, Item item, double usefulness);
27  
28  }