Skip to content

Commit

Permalink
paramater and grammar file added for coevolution experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
aadeshnpn committed Sep 28, 2021
1 parent 36d3a75 commit 914abac
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 4 deletions.
13 changes: 9 additions & 4 deletions examples/nestm_evolution/experiments.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
python experiment.py --exp_no 0 --iter 12000 --runs 16 --thread 16 --fitid 0
python experiment.py --exp_no 0 --iter 12000 --runs 16 --thread 16 --fitid 1
python experiment.py --exp_no 0 --iter 12000 --runs 16 --thread 16 --fitid 3
# python experiment.py --exp_no 0 --iter 12000 --runs 16 --thread 16 --fitid 0
# python experiment.py --exp_no 0 --iter 12000 --runs 16 --thread 16 --fitid 1
# python experiment.py --exp_no 0 --iter 12000 --runs 16 --thread 16 --fitid 3

python experiment.py --exp_no 0 --iter 12000 --runs 16 --thread 16 --fitid 0
python experiment.py --exp_no 0 --iter 12000 --runs 16 --thread 16 --fitid 1
python experiment.py --exp_no 0 --iter 12000 --runs 16 --thread 16 --fitid 3
python experiment.py --exp_no 0 --iter 12000 --runs 16 --thread 16 --fitid 0
python experiment.py --exp_no 0 --iter 12000 --runs 16 --thread 16 --fitid 1
python experiment.py --exp_no 0 --iter 12000 --runs 16 --thread 16 --fitid 3
python experiment.py --exp_no 0 --iter 12000 --runs 16 --thread 16 --fitid 0
python experiment.py --exp_no 0 --iter 12000 --runs 16 --thread 16 --fitid 1
python experiment.py --exp_no 0 --iter 12000 --runs 16 --thread 16 --fitid 3
23 changes: 23 additions & 0 deletions grammars/coevo.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<s> ::= [?xml version=%1.0% encoding=%UTF-8%?]<root>
<root> ::= <sequence> | <selector>
<sequence> ::= [Sequence]<ppa>[/Sequence] | [Sequence]<root><root>[/Sequence] | [Sequence]<sequence> <root>[/Sequence]
<selector> ::= [Selector]<ppa>[/Selector] | [Selector]<root><root>[/Selector] | [Selector]<selector> <root>[/Selector]
<ppa> ::= [Selector]<postconditions><ppasequence>[/Selector]
<postconditions>::= <SuccessNode> | <ppa> | [Sequence]<postcondition>[/Sequence]
<postcondition> ::= <postcondition>[PostCnd]<postconditiont>[/PostCnd]|[PostCnd]<postconditiont>[/PostCnd]
<postconditiont> ::= NeighbourObjects_<objects>|NeighbourObjects_<sobjects>|NeighbourObjects_<dobjects>|IsCarrying_<dobjects>|IsVisitedBefore_<sobjects>
<ppasequence> ::= [Sequence]<preconditions>[Act]<action>[/Act][/Sequence]|[Sequence]<constraints>[Act]<action>[/Act][/Sequence]|[Sequence]<preconditions><constraints>[Act]<action>[/Act][/Sequence]

<preconditions> ::= [Sequence]<precondition>[/Sequence]
<precondition> ::= <precondition>[PreCnd]<preconditiont>[/PreCnd]|[PreCnd]<preconditiont>[/PreCnd]
<preconditiont> ::=IsDropable_<sobjects>|NeighbourObjects_<objects>|NeighbourObjects_<objects>_invert|IsVisitedBefore_<sobjects>|IsVisitedBefore_<sobjects>_invert|IsCarrying_<dobjects>|IsCarrying_<dobjects>_invert

<constraints> ::= [Sequence]<constraint>[/Sequence]
<constraint> ::= <constraint>[Cnstr]<constraintt>[/Cnstr]|[Cnstr]<constraintt>[/Cnstr]
<constraintt> ::=CanMove|IsCarryable_<dobjects>|IsDropable_<sobjects>

<action> ::= MoveTowards_<sobjects>|Explore|CompositeSingleCarry_<dobjects>|CompositeDrop_<dobjects>|MoveAway_<sobjects>
<sobjects>::=Hub|Sites|Boundary|Trap|Obstacles
<dobjects>::=Food|Debris
<objects>::=<sobjects>|<dobjects>
<SuccessNode> ::= [PostCnd]DummyNode[/PostCnd]
20 changes: 20 additions & 0 deletions parameters/coevo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
CACHE: True
CODON_SIZE: 2000
CROSSOVER: variable_onepoint
CROSSOVER_PROBABILITY: 0.9
DEBUG: False
GENERATIONS: 1000
MAX_GENOME_LENGTH: 100
GRAMMAR_FILE: ../..,coevo.bnf
INITIALISATION: uniform_tree
INVALID_SELECTION: False
MAX_INIT_TREE_DEPTH: 7
MAX_TREE_DEPTH: 10
MUTATION: int_flip_per_codon
MUTATION_PROBABILITY: 0.1
FITNESS_FUNCTION: swarm.bt_diversity
REPLACEMENT: generational
SELECTION: truncation
VERBOSE: False
SILENT: True
COMMUNICATION: False

0 comments on commit 914abac

Please sign in to comment.