diff --git a/courses/artificialintelligence/assignments/flocking/README.md b/courses/artificialintelligence/assignments/flocking/README.md index 17b4ad37..ef26bbbe 100644 --- a/courses/artificialintelligence/assignments/flocking/README.md +++ b/courses/artificialintelligence/assignments/flocking/README.md @@ -184,17 +184,16 @@ In this example we are going to test only the cohesion behavior. The input is co 1.000 0.000 0.000 0.000 1.000 0.000 0.000 2 0.000 0.500 0.000 0.000 0.000 -0.500 0.000 0.000 -0.010 -EOF +0.125 ``` ## Output -The expected output is the position and velocity for each agent after the simulation step using the time frame. After printing each simulation step, the program should wait for the next time frame and then simulate the next step. All values should have exactly 3 decimal places and should not be rounded. +The expected output is the position and velocity for each agent after the simulation step using the time frame. After printing each simulation step, the program should wait for the next time frame and then simulate the next step. All values should have exactly 3 decimal places and should be rounded to the nearest. ```text -0.000 0.490 0.000 -0.010 -0.000 -0.490 0.000 0.010 +0.000 0.484 0.000 -0.125 +0.000 -0.484 0.000 0.125 ``` ## Grading diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-a.in b/courses/artificialintelligence/assignments/flocking/tests/test-a.in index 1fc2014c..c79a0967 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-a.in +++ b/courses/artificialintelligence/assignments/flocking/tests/test-a.in @@ -1,4 +1,4 @@ 1.000 0.000 0.000 0.000 1.000 0.000 0.000 2 0.000 0.500 0.000 0.000 0.000 -0.500 0.000 0.000 -0.010 +0.125 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-a.out b/courses/artificialintelligence/assignments/flocking/tests/test-a.out index 60ebdd46..9a72b593 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-a.out +++ b/courses/artificialintelligence/assignments/flocking/tests/test-a.out @@ -1,2 +1,2 @@ -0.000 0.490 0.000 -1.000 -0.000 -0.490 0.000 1.000 +0.000 0.484 0.000 -0.125 +0.000 -0.484 0.000 0.125 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-b.in b/courses/artificialintelligence/assignments/flocking/tests/test-b.in index 3b7a1b75..9881ad43 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-b.in +++ b/courses/artificialintelligence/assignments/flocking/tests/test-b.in @@ -1,4 +1,4 @@ 0.000 1.000 1.000 0.000 0.000 2.000 0.000 2 0.000 0.500 0.000 0.000 0.000 -0.500 0.000 0.000 -0.010 +0.125 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-b.out b/courses/artificialintelligence/assignments/flocking/tests/test-b.out index 8511c5ff..89726a23 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-b.out +++ b/courses/artificialintelligence/assignments/flocking/tests/test-b.out @@ -1,2 +1,2 @@ -0.000 0.520 0.000 2.000 -0.000 -0.520 0.000 -2.000 +0.000 0.531 0.000 0.250 +0.000 -0.531 0.000 -0.250 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-c.in b/courses/artificialintelligence/assignments/flocking/tests/test-c.in index 8ade4d07..76062422 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-c.in +++ b/courses/artificialintelligence/assignments/flocking/tests/test-c.in @@ -1,4 +1,4 @@ 0.000 0.000 0.000 2.000 0.000 0.000 2.000 2 0.000 0.500 3.000 0.000 0.000 -0.500 -2.000 0.000 -0.100 +0.125 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-c.out b/courses/artificialintelligence/assignments/flocking/tests/test-c.out index 98f261f7..895d8c54 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-c.out +++ b/courses/artificialintelligence/assignments/flocking/tests/test-c.out @@ -1,2 +1,2 @@ -0.400 0.500 4.000 0.000 --0.100 -0.500 -1.000 0.000 +0.391 0.500 3.125 0.000 +-0.234 -0.500 -1.875 0.000 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-d.in b/courses/artificialintelligence/assignments/flocking/tests/test-d.in index 42587a07..d0e64e5d 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-d.in +++ b/courses/artificialintelligence/assignments/flocking/tests/test-d.in @@ -1,4 +1,4 @@ 1.000 1.000 1.000 0.000 3.000 2.000 0.000 2 0.000 0.500 0.000 0.000 0.000 -0.500 0.000 0.000 -0.010 +0.125 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-d.out b/courses/artificialintelligence/assignments/flocking/tests/test-d.out index 60ebdd46..9a72b593 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-d.out +++ b/courses/artificialintelligence/assignments/flocking/tests/test-d.out @@ -1,2 +1,2 @@ -0.000 0.490 0.000 -1.000 -0.000 -0.490 0.000 1.000 +0.000 0.484 0.000 -0.125 +0.000 -0.484 0.000 0.125 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-e.in b/courses/artificialintelligence/assignments/flocking/tests/test-e.in index 9f1a5ee5..def6c159 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-e.in +++ b/courses/artificialintelligence/assignments/flocking/tests/test-e.in @@ -1,4 +1,4 @@ 0.000 2.000 1.000 1.000 0.000 2.000 3.000 2 0.000 0.500 -2.000 -1.000 0.000 -0.500 2.000 3.000 -0.010 +0.125 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-e.out b/courses/artificialintelligence/assignments/flocking/tests/test-e.out index 3c6f5f1e..ee72bb3c 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-e.out +++ b/courses/artificialintelligence/assignments/flocking/tests/test-e.out @@ -1,2 +1,2 @@ --0.020 0.540 -2.000 4.000 -0.020 -0.460 2.000 4.000 +-0.250 0.453 -2.000 -0.375 +0.250 -0.109 2.000 3.125 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-f.in b/courses/artificialintelligence/assignments/flocking/tests/test-f.in index deecf30d..ecf6ad44 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-f.in +++ b/courses/artificialintelligence/assignments/flocking/tests/test-f.in @@ -1,4 +1,4 @@ 1.000 0.000 0.000 1.000 1.000 0.000 2.000 2 0.000 0.500 -1.000 2.000 0.000 -0.500 3.000 1.000 -0.010 +0.125 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-f.out b/courses/artificialintelligence/assignments/flocking/tests/test-f.out index e11e2111..62104a06 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-f.out +++ b/courses/artificialintelligence/assignments/flocking/tests/test-f.out @@ -1,2 +1,2 @@ -0.010 0.540 1.000 4.000 -0.050 -0.450 5.000 5.000 +-0.094 0.781 -0.750 2.250 +0.406 -0.312 3.250 1.500 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-g.in b/courses/artificialintelligence/assignments/flocking/tests/test-g.in index 36316e94..541f6d46 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-g.in +++ b/courses/artificialintelligence/assignments/flocking/tests/test-g.in @@ -1,4 +1,4 @@ 1.000 2.000 1.000 1.000 1.000 2.000 3.000 2 0.000 0.500 -2.000 -1.000 0.000 -0.500 2.000 3.000 -0.020 +0.125 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-g.out b/courses/artificialintelligence/assignments/flocking/tests/test-g.out index 05130d98..440e7fd1 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-g.out +++ b/courses/artificialintelligence/assignments/flocking/tests/test-g.out @@ -1,2 +1,2 @@ --0.040 0.560 -2.000 3.000 -0.040 -0.400 2.000 5.000 +-0.250 0.438 -2.000 -0.500 +0.250 -0.094 2.000 3.250 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-h.in b/courses/artificialintelligence/assignments/flocking/tests/test-h.in index 4345763e..eadfaa61 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-h.in +++ b/courses/artificialintelligence/assignments/flocking/tests/test-h.in @@ -1,5 +1,5 @@ 1.000 2.000 1.000 0.000 1.000 2.000 0.000 2 0.000 0.500 -2.000 -1.000 0.000 -0.500 2.000 3.000 -0.020 -0.100 +0.125 +0.125 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-h.out b/courses/artificialintelligence/assignments/flocking/tests/test-h.out index a06ecbe5..48754d7b 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-h.out +++ b/courses/artificialintelligence/assignments/flocking/tests/test-h.out @@ -1,4 +1,4 @@ --0.040 0.500 -2.000 0.000 -0.040 -0.460 2.000 2.000 --0.373 0.545 -3.334 0.454 -0.373 -0.305 3.334 1.546 +-0.250 0.391 -2.000 -0.875 +0.250 -0.141 2.000 2.875 +-0.514 0.295 -2.114 -0.765 +0.514 0.205 2.114 2.765 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-i.out b/courses/artificialintelligence/assignments/flocking/tests/test-i.out index d90b922e..92934cb4 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-i.out +++ b/courses/artificialintelligence/assignments/flocking/tests/test-i.out @@ -1,4 +1,4 @@ -0.278 0.180 -5.772 5.439 --1.528 1.070 -4.228 4.561 --2.559 2.812 -22.698 21.060 --3.691 3.438 -17.302 18.940 +0.746 -0.251 -2.034 1.992 +-1.175 0.681 -1.403 1.445 +0.401 0.082 -2.760 2.661 +-1.421 0.939 -1.967 2.065 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-j.in b/courses/artificialintelligence/assignments/flocking/tests/test-j.in index 52f204f8..2648a6d6 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-j.in +++ b/courses/artificialintelligence/assignments/flocking/tests/test-j.in @@ -1,8 +1,7 @@ 0.000 10.000 1.000 0.000 0.000 1.000 0.000 2 0.010 0.000 0.000 0.000 -0.010 0.000 0.000 0.000 -0.010 -0.010 -0.010 -0.010 -0.010 +0.125 +0.125 +0.125 +0.25 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-j.out b/courses/artificialintelligence/assignments/flocking/tests/test-j.out index d45c3f4a..5557166e 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-j.out +++ b/courses/artificialintelligence/assignments/flocking/tests/test-j.out @@ -1,10 +1,8 @@ -0.510 0.000 50.000 0.000 --0.510 0.000 -50.000 0.000 -1.020 0.000 50.980 0.000 --1.020 0.000 -50.980 0.000 -1.535 0.000 51.471 0.000 --1.535 0.000 -51.471 0.000 -2.052 0.000 51.797 0.000 --2.052 0.000 -51.797 0.000 -2.573 0.000 52.040 0.000 --2.573 0.000 -52.040 0.000 +0.791 0.000 6.250 0.000 +-0.791 0.000 -6.250 0.000 +1.582 0.000 6.329 0.000 +-1.582 0.000 -6.329 0.000 +2.378 0.000 6.368 0.000 +-2.378 0.000 -6.368 0.000 +3.984 0.000 6.421 0.000 +-3.984 0.000 -6.421 0.000 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-k.in b/courses/artificialintelligence/assignments/flocking/tests/test-k.in index dd1d3062..fff8d1c4 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-k.in +++ b/courses/artificialintelligence/assignments/flocking/tests/test-k.in @@ -1,3 +1,3 @@ 1.000 1.000 1.000 1.000 1.000 2.000 0.500 1 0.000 0.500 1.000 0.000 -0.010 +0.125 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-k.out b/courses/artificialintelligence/assignments/flocking/tests/test-k.out index b69bd45b..b662203c 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-k.out +++ b/courses/artificialintelligence/assignments/flocking/tests/test-k.out @@ -1 +1 @@ -0.015 0.500 1.500 0.000 +0.133 0.500 1.062 0.000 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-l.in b/courses/artificialintelligence/assignments/flocking/tests/test-l.in index 3633407d..2bb09cff 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-l.in +++ b/courses/artificialintelligence/assignments/flocking/tests/test-l.in @@ -2,5 +2,5 @@ 0.000 0.500 0.000 0.000 0.000 0.000 1.100 0.000 0.000 -0.500 0.000 0.000 -0.010 -0.010 +0.125 +0.125 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-l.out b/courses/artificialintelligence/assignments/flocking/tests/test-l.out index 34d24c35..6167e9c1 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-l.out +++ b/courses/artificialintelligence/assignments/flocking/tests/test-l.out @@ -1,6 +1,6 @@ -0.000 0.492 0.000 -0.750 -0.011 0.000 1.100 0.000 -0.000 -0.492 0.000 0.750 -0.000 0.478 0.006 -1.489 -0.022 0.000 1.089 0.000 -0.000 -0.478 0.006 1.489 +0.000 0.488 0.000 -0.094 +0.138 0.000 1.100 0.000 +0.000 -0.488 0.000 0.094 +0.001 0.465 0.009 -0.185 +0.273 0.000 1.083 0.000 +0.001 -0.465 0.009 0.185 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-m.in b/courses/artificialintelligence/assignments/flocking/tests/test-m.in index bd3b996d..3943005f 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-m.in +++ b/courses/artificialintelligence/assignments/flocking/tests/test-m.in @@ -4,6 +4,6 @@ -0.500 0.500 0.000 0.000 0.500 -0.500 0.000 0.000 0.000 0.000 0.000 0.000 -0.010 -0.010 -0.020 +0.125 +0.125 +0.125 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-m.out b/courses/artificialintelligence/assignments/flocking/tests/test-m.out index c5daef43..78641d0f 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-m.out +++ b/courses/artificialintelligence/assignments/flocking/tests/test-m.out @@ -1,15 +1,15 @@ -0.514 0.514 1.414 1.414 --0.514 -0.514 -1.414 -1.414 --0.514 0.514 -1.414 1.414 -0.514 -0.514 1.414 -1.414 +0.522 0.522 0.177 0.177 +-0.522 -0.522 -0.177 -0.177 +-0.522 0.522 -0.177 0.177 +0.522 -0.522 0.177 -0.177 0.000 0.000 0.000 0.000 -0.558 0.558 4.384 4.384 --0.558 -0.558 -4.384 -4.384 --0.558 0.558 -4.384 4.384 -0.558 -0.558 4.384 -4.384 +0.569 0.569 0.378 0.378 +-0.569 -0.569 -0.378 -0.378 +-0.569 0.569 -0.378 0.378 +0.569 -0.569 0.378 -0.378 0.000 0.000 0.000 0.000 -0.770 0.770 10.621 10.621 --0.770 -0.770 -10.621 -10.621 --0.770 0.770 -10.621 10.621 -0.770 -0.770 10.621 -10.621 +0.645 0.645 0.607 0.607 +-0.645 -0.645 -0.607 -0.607 +-0.645 0.645 -0.607 0.607 +0.645 -0.645 0.607 -0.607 0.000 0.000 0.000 0.000 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-o.in b/courses/artificialintelligence/assignments/flocking/tests/test-o.in index c01adea0..0be46a24 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-o.in +++ b/courses/artificialintelligence/assignments/flocking/tests/test-o.in @@ -6,4 +6,4 @@ 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 -1.000 0.000 0.000 0.000 -12345.000 +256.000 diff --git a/courses/artificialintelligence/assignments/flocking/tests/test-o.out b/courses/artificialintelligence/assignments/flocking/tests/test-o.out index f1ca702a..d83be3d1 100644 --- a/courses/artificialintelligence/assignments/flocking/tests/test-o.out +++ b/courses/artificialintelligence/assignments/flocking/tests/test-o.out @@ -1,7 +1,7 @@ --960.976 16687.769 -0.078 1.352 -960.976 -16687.769 0.078 -1.352 -960.976 16687.769 0.078 1.352 --960.976 -16687.769 -0.078 -1.352 +-5103.697 88588.336 -19.938 346.046 +5103.697 -88588.336 19.938 -346.046 +5103.697 88588.336 19.938 346.046 +-5103.697 -88588.336 -19.938 -346.046 0.000 0.000 0.000 0.000 -80122.366 0.000 6.490 0.000 --80122.366 0.000 -6.490 0.000 +425341.933 0.000 1661.488 0.000 +-425341.933 0.000 -1661.488 0.000