A java PacMan game application for A.U.TH (data structures class)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.2 KiB

  1. /**
  2. * @file Globals.java
  3. * @brief
  4. * File containing the Globals class, a helper class for the
  5. * vector based evaluation system
  6. *
  7. * @author Christos Choutouridis 8997 cchoutou@ece.auth.gr
  8. * @author Konstantina Tsechelidou 8445 konstsec@ece.auth.gr
  9. */
  10. package gr.auth.ee.dsproject.node;
  11. /**
  12. * @class Globals
  13. * @brief
  14. * Contains constants and factors to trick
  15. * the Node evaluation algorithm
  16. */
  17. public class Globals {
  18. /*
  19. * Global constants
  20. */
  21. public static final int NO_PLACE = -1; // out of region square
  22. //public static final int NO_MOVE = -1;
  23. public static final int INVALID_MOVE = -1; // invalid move marker
  24. public static final int EVAL_MAX = 100; // out max evaluation value
  25. public static final int EVAL_MIN = -100; // our minimum evaluation value
  26. public static final int NO_EVAL = EVAL_MIN-1; // mark the invalid move or no evaluation
  27. /*
  28. * Evaluation settings
  29. */
  30. /**
  31. * Mixing factor for the minimum distance
  32. */
  33. public static final double EVAL_GHOSTDIST_MIN_FACTOR = 0.8;
  34. public static final double EVAL_LGHOSTDIST_AVER_FACTOR = 1 - EVAL_GHOSTDIST_MIN_FACTOR;
  35. /**
  36. * Evaluation mixing factor representing how much the ghost distances will
  37. * affect the final evaluation value
  38. */
  39. public static final double EVAL_GHOSTDIST_FACTOR = 0.6;
  40. /**
  41. * Evaluation mixing factor representing how much the flag distances will
  42. * affect the final evaluation value
  43. */
  44. public static final double EVAL_FLAGDIST_FACTOR = 1 - EVAL_GHOSTDIST_FACTOR;
  45. /*
  46. * Tree settings
  47. */
  48. public static final int MINMAXTREE_MAX_DEPTH = 2; // MUST be multiple of 2
  49. /*
  50. * In order to find out when a ghost is inside a cavity we manualy
  51. * define the box limits of the cavity boxes of the current maze here
  52. * :)
  53. */
  54. public static final int BOXES[][][] = {
  55. { { 5, 5}, { 8, 8} },
  56. { { 5, 16}, { 8, 19} },
  57. { {11, 5}, {14, 8} },
  58. { {11, 16}, {14, 19} }
  59. };
  60. public static final int[] FALSE_POS = {-1, -1};
  61. public static final int MAX_DISTANCE = 100;
  62. }