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.

76 lines
2.3 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. import gr.auth.ee.dsproject.pacman.PacmanUtilities;
  12. /**
  13. * @class Globals
  14. * @brief
  15. * Contains constants and factors to trick
  16. * the Node evaluation algorithm
  17. */
  18. public class Globals {
  19. /*
  20. * Global constants
  21. */
  22. public static final int NO_PLACE = -1; // out of region square
  23. //public static final int NO_MOVE = -1;
  24. public static final int INVALID_MOVE = -1; // invalid move marker
  25. public static final int EVAL_MAX = 100; // out max evaluation value
  26. public static final int EVAL_MIN = -100; // our minimum evaluation value
  27. public static final int NO_EVAL = EVAL_MIN-1; // mark the invalid move or no evaluation
  28. /*
  29. * Evaluation settings
  30. */
  31. /**
  32. * Mixing factor for the minimum distance
  33. */
  34. public static final double EVAL_GHOSTDIST_MIN_FACTOR = 0.8;
  35. public static final double EVAL_LGHOSTDIST_AVER_FACTOR = 1 - EVAL_GHOSTDIST_MIN_FACTOR;
  36. /**
  37. * Evaluation mixing factor representing how much the ghost distances will
  38. * affect the final evaluation value
  39. */
  40. public static final double EVAL_GHOSTDIST_FACTOR = 0.6;
  41. /**
  42. * Evaluation mixing factor representing how much the flag distances will
  43. * affect the final evaluation value
  44. */
  45. public static final double EVAL_FLAGDIST_FACTOR = 1 - EVAL_GHOSTDIST_FACTOR;
  46. /*
  47. * Tree settings
  48. */
  49. public static final int MINMAXTREE_MAX_DEPTH = 2; // MUST be multiple of 2
  50. /*
  51. * In order to find out when a ghost is inside a cavity we manualy
  52. * define the box limits of the cavity boxes of the current maze here
  53. * :)
  54. */
  55. public static final int BOXES[][][] = {
  56. { { 5, 5}, { 8, 8} },
  57. { { 5, 16}, { 8, 19} },
  58. { {11, 5}, {14, 8} },
  59. { {11, 16}, {14, 19} }
  60. };
  61. public static final int[] FALSE_POS = {-1, -1};
  62. public static final int MAX_DISTANCE = PacmanUtilities.numberOfRows + PacmanUtilities.numberOfColumns - 1;
  63. }