config.py 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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': 1,
  61. 'max_put_fail_count': 20
  62. }
  63. },
  64. 'stigmergy': {
  65. 'molecule': {
  66. 'evaporate_decrement': 5,
  67. 'evaporate_min_age': 1000,
  68. 'evaporate_each_cycle': 100
  69. }
  70. }
  71. }