config.py 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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']))
  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. else:
  13. parser.parse_args(['-h'])
  14. config = {
  15. 'app': {
  16. 'name': 'StigEngine',
  17. 'classes': {
  18. 'Context': Context
  19. }
  20. },
  21. 'engine': {
  22. 'fpsmax': 2555,
  23. 'debug': {
  24. 'mainprocess': True,
  25. 'cycles': -1,
  26. 'seed': 42
  27. },
  28. 'clean_each_cycle': 100
  29. },
  30. 'simulations': simulations,
  31. 'connections': [Pygame],
  32. 'terminal': {
  33. 'pygame': {
  34. 'visualisation': pygame_visualisation,
  35. 'window_size': (800, 600),
  36. 'app': {
  37. 'name': 'SocialIntengine'
  38. },
  39. 'display': {
  40. 'grid': {
  41. 'size': 20
  42. }
  43. },
  44. 'font': {
  45. 'name': 'arial',
  46. 'size': 13
  47. },
  48. 'background': {
  49. 'color': (125, 125, 125)
  50. }
  51. }
  52. },
  53. 'ant': {
  54. 'take': {
  55. 'cant_put_still': 5
  56. },
  57. 'put': {
  58. 'max_objects_at_same_position': 5
  59. }
  60. },
  61. 'stigmergy': {
  62. 'molecule': {
  63. 'evaporate_decrement': 5,
  64. 'evaporate_min_age': 100,
  65. 'evaporate_each_cycle': 100
  66. }
  67. }
  68. }