config.py 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. from intelligine.core.Context import Context
  2. from intelligine.display.Pygame import Pygame
  3. import argparse
  4. parser = argparse.ArgumentParser(description='Select sandbox.')
  5. parser.add_argument('sandbox', metavar='sandbox', type=str, nargs=1,
  6. help='Name of sandbox: ' + ', '.join(['exploration', 'all', 'test']))
  7. args = parser.parse_args()
  8. if 'all' in args.sandbox:
  9. from intelligine.sandbox.all.all import simulations, visualisation as pygame_visualisation
  10. elif 'exploration' in args.sandbox:
  11. from intelligine.sandbox.exploration.exploration import simulations, visualisation as pygame_visualisation
  12. elif 'test' in args.sandbox:
  13. from intelligine.sandbox.test.test import simulations, visualisation as pygame_visualisation
  14. else:
  15. parser.parse_args(['-h'])
  16. config = {
  17. 'app': {
  18. 'name': 'StigEngine',
  19. 'classes': {
  20. 'Context': Context
  21. }
  22. },
  23. 'engine': {
  24. 'fpsmax': 2555,
  25. 'debug': {
  26. 'mainprocess': True,
  27. 'cycles': -1,
  28. 'seed': 42
  29. },
  30. 'clean_each_cycle': 100
  31. },
  32. 'simulations': simulations,
  33. 'connections': [Pygame],
  34. 'terminal': {
  35. 'pygame': {
  36. 'visualisation': pygame_visualisation,
  37. 'window_size': (800, 600),
  38. 'app': {
  39. 'name': 'SocialIntengine'
  40. },
  41. 'display': {
  42. 'grid': {
  43. 'size': 20
  44. }
  45. },
  46. 'font': {
  47. 'name': 'arial',
  48. 'size': 13
  49. },
  50. 'background': {
  51. 'color': (125, 125, 125)
  52. }
  53. }
  54. },
  55. 'ant': {
  56. 'take': {
  57. 'cant_put_still': 5
  58. },
  59. 'put': {
  60. 'max_objects_at_same_position': 5
  61. }
  62. },
  63. 'stigmergy': {
  64. 'molecule': {
  65. 'evaporate_decrement': 5,
  66. 'evaporate_min_age': 100,
  67. 'evaporate_each_cycle': 100
  68. }
  69. }
  70. }