Skip to content

Commit

Permalink
deploy: 6200ded
Browse files Browse the repository at this point in the history
  • Loading branch information
tolstenko committed Sep 28, 2024
0 parents commit a2d2a9f
Show file tree
Hide file tree
Showing 518 changed files with 63,307 additions and 0 deletions.
Empty file added .nojekyll
Empty file.
1 change: 1 addition & 0 deletions 404.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
courses.tolstenko.net
7 changes: 7 additions & 0 deletions advanced/01-introduction/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
subdirlist(activity_dir ${CMAKE_CURRENT_SOURCE_DIR})

foreach(subdir ${activity_dir})
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/CMakeLists.txt")
add_subdirectory(${subdir})
endif()
endforeach()
14 changes: 14 additions & 0 deletions advanced/01-introduction/actvities/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
file(GLOB adv_intro_src CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)

enable_testing()

add_executable(adv-01-intro ${adv_intro_src})
include(${doctest_SOURCE_DIR}/scripts/cmake/doctest.cmake)
target_include_directories(adv-01-intro PUBLIC ${DOCTEST_INCLUDE_DIR})
target_link_libraries(adv-01-intro doctest::doctest)
doctest_discover_tests(adv-01-intro)

if(ENABLE_TEST_COVERAGE)
target_compile_options(adv-01-intro PUBLIC -O0 -g -fprofile-arcs -ftest-coverage)
target_link_options(adv-01-intro PUBLIC -fprofile-arcs -ftest-coverage)
endif()
25 changes: 25 additions & 0 deletions advanced/01-introduction/actvities/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include <doctest/doctest.h>
using namespace std;

// create a function that allocates memory on the heap and returns a raw pointer to it
char* allocateMemoryAndClear(int numBytes, char value) {
// implement this function
}

// create a function that deallocates memory on the heap
void deallocateMemory(char*& ptr) {
// implement this function
}


// DO NOT CHANGE THE CODE BELOW THIS LINE
TEST_CASE("allocateMemory") {
char* ptr = allocateMemoryAndClear(3, 'u');
CHECK(ptr != nullptr);
CHECK(ptr[0] == 'u');
CHECK(ptr[1] == 'u');
CHECK(ptr[2] == 'u');
deallocateMemory(ptr);
CHECK(ptr == nullptr);
}
74 changes: 74 additions & 0 deletions advanced/01-introduction/index.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions advanced/01-introduction/setup/index.html

Large diffs are not rendered by default.

Binary file added advanced/02-oop/img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added advanced/02-oop/img_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added advanced/02-oop/img_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
190 changes: 190 additions & 0 deletions advanced/02-oop/index.html

Large diffs are not rendered by default.

251 changes: 251 additions & 0 deletions advanced/03-pointers/index.html

Large diffs are not rendered by default.

Binary file added advanced/04-operators/img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
164 changes: 164 additions & 0 deletions advanced/04-operators/index.html

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions advanced/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
subdirlist(advcpp_chapters ${CMAKE_CURRENT_SOURCE_DIR})

foreach(subdir ${advcpp_chapters})
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/CMakeLists.txt")
add_subdirectory(${subdir})
endif()
endforeach()
12 changes: 12 additions & 0 deletions advanced/index.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions algorithms/01-introduction/index.html

Large diffs are not rendered by default.

Binary file added algorithms/02-analysis/img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added algorithms/02-analysis/img_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added algorithms/02-analysis/img_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added algorithms/02-analysis/img_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions algorithms/02-analysis/index.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 107 additions & 0 deletions algorithms/03-dynamic-data/index.html

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions algorithms/04-sorting/index.html

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added algorithms/05-divide-and-conquer/img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added algorithms/05-divide-and-conquer/img_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added algorithms/05-divide-and-conquer/img_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added algorithms/05-divide-and-conquer/img_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added algorithms/05-divide-and-conquer/img_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
233 changes: 233 additions & 0 deletions algorithms/05-divide-and-conquer/index.html

Large diffs are not rendered by default.

Binary file added algorithms/06-hashtables/img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added algorithms/06-hashtables/img_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added algorithms/06-hashtables/img_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added algorithms/06-hashtables/img_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added algorithms/06-hashtables/img_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added algorithms/06-hashtables/img_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
419 changes: 419 additions & 0 deletions algorithms/06-hashtables/index.html

Large diffs are not rendered by default.

Binary file added algorithms/06-hashtables/kitten-cat.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions algorithms/07-midterm/index.html

Large diffs are not rendered by default.

Binary file added algorithms/08-stack-and-queue/Queue.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added algorithms/08-stack-and-queue/img_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
120 changes: 120 additions & 0 deletions algorithms/08-stack-and-queue/index.html

Large diffs are not rendered by default.

Binary file added algorithms/08-stack-and-queue/stack.gif
12 changes: 12 additions & 0 deletions algorithms/09-break/index.html

Large diffs are not rendered by default.

Binary file added algorithms/10-graphs/img.png
Binary file added algorithms/10-graphs/img_1.png
Binary file added algorithms/10-graphs/img_2.png
Binary file added algorithms/10-graphs/img_3.png
185 changes: 185 additions & 0 deletions algorithms/10-graphs/index.html

Large diffs are not rendered by default.

Binary file added algorithms/11-dijkstra/img.png
Binary file added algorithms/11-dijkstra/img_1.png
Binary file added algorithms/11-dijkstra/img_2.png
130 changes: 130 additions & 0 deletions algorithms/11-dijkstra/index.html

Large diffs are not rendered by default.

465 changes: 465 additions & 0 deletions algorithms/12-mst/index.html

Large diffs are not rendered by default.

Binary file added algorithms/13-bst/img.png
12 changes: 12 additions & 0 deletions algorithms/13-bst/index.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions algorithms/14-heap/index.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions algorithms/15-project/index.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions algorithms/16-finals/index.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions algorithms/index.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions artificialintelligence/00-introduction/index.html

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions artificialintelligence/01-pcg/index.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions artificialintelligence/02-sm/index.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions artificialintelligence/03-boardgames/index.html

Large diffs are not rendered by default.

257 changes: 257 additions & 0 deletions artificialintelligence/04-spatialhashing/index.html

Large diffs are not rendered by default.

198 changes: 198 additions & 0 deletions artificialintelligence/05-kdtree/index.html

Large diffs are not rendered by default.

301 changes: 301 additions & 0 deletions artificialintelligence/06-pathfinding/index.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions artificialintelligence/07-automatedtesting/index.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions artificialintelligence/09-minmax/index.html

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions artificialintelligence/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
function(add_custom_test TEST_NAME TEST_EXECUTABLE TEST_INPUT_LIST TEST_EXPECTED_OUTPUT_LIST)
list(LENGTH TEST_INPUT_LIST num_tests)

MATH(EXPR num_tests "${num_tests} - 1")
message(STATUS "Adding ${num_tests} tests for ${TEST_NAME}.")

set(TEST_COMMANDS "")
foreach(index RANGE 0 ${num_tests})
list(GET TEST_INPUT_LIST ${index} TEST_INPUT)
list(GET TEST_EXPECTED_OUTPUT_LIST ${index} TEST_EXPECTED_OUTPUT)

list(APPEND TEST_COMMANDS
COMMAND ${CMAKE_COMMAND} -E echo "Running test: ${TEST_NAME}_${index}. Using input file: ${TEST_INPUT}"
COMMAND ${CMAKE_COMMAND} -E cat ${TEST_INPUT}
COMMAND ${CMAKE_COMMAND} -E echo "=================================="
COMMAND ${CMAKE_COMMAND} -E echo "Expected Output from ${TEST_NAME}_${index}:"
COMMAND ${CMAKE_COMMAND} -E cat ${TEST_EXPECTED_OUTPUT}
COMMAND ${CMAKE_COMMAND} -E echo "=================================="
COMMAND ${TEST_EXECUTABLE} < ${TEST_INPUT} > test_output_${index}.txt
COMMAND ${CMAKE_COMMAND} -E echo "Actual Output from ${TEST_NAME}_${index}:"
COMMAND ${CMAKE_COMMAND} -E cat test_output_${index}.txt
COMMAND ${CMAKE_COMMAND} -E echo "=================================="
COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_EXPECTED_OUTPUT} test_output_${index}.txt
COMMAND ${CMAKE_COMMAND} -E echo "Test ${TEST_NAME}_${index} passed."
)
endforeach()

add_custom_target(${TEST_NAME}
${TEST_COMMANDS}
DEPENDS ${TEST_EXECUTABLE}
)
endfunction()

add_subdirectory(assignments/flocking)
add_subdirectory(assignments/maze)
add_subdirectory(assignments/life)
add_subdirectory(assignments/rng)
#add_subdirectory(assignments/catchthecat)
12 changes: 12 additions & 0 deletions artificialintelligence/animation/index.html

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions artificialintelligence/assignments/catchthecat/Cat.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef CAT_h
#define CAT_h
#include "IAgent.h"

struct Cat : public IAgent {
std::pair<int,int> move(const std::vector<bool>& world, std::pair<int,int> catPos, int sideSize ) override{
return {0,0}; // todo: change this
}
};
#endif
10 changes: 10 additions & 0 deletions artificialintelligence/assignments/catchthecat/Catcher.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef CATCHER_H
#define CATCHER_H
#include "IAgent.h"

struct Catcher : public IAgent {
std::pair<int,int> move(const std::vector<bool>& world, std::pair<int,int> catPos, int sideSize ) override{
return {0,0}; // todo: change this
}
};
#endif
7 changes: 7 additions & 0 deletions artificialintelligence/assignments/flocking/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
add_executable(ai-flocking flocking.cpp)

file(GLOB TEST_INPUT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/tests/*.in)
file(GLOB TEST_OUTPUT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/tests/*.out)

add_custom_test(ai-flocking-test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/flocking "${TEST_INPUT_FILES}" "${TEST_OUTPUT_FILES}")

18 changes: 18 additions & 0 deletions artificialintelligence/assignments/flocking/index.html

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-a.in
Original file line number Diff line number Diff line change
@@ -0,0 +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.125
2 changes: 2 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-a.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
0.000 0.484 0.000 -0.125
0.000 -0.484 0.000 0.125
4 changes: 4 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-b.in
Original file line number Diff line number Diff line change
@@ -0,0 +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.125
2 changes: 2 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-b.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
0.000 0.531 0.000 0.250
0.000 -0.531 0.000 -0.250
4 changes: 4 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-c.in
Original file line number Diff line number Diff line change
@@ -0,0 +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.125
2 changes: 2 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-c.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
0.391 0.500 3.125 0.000
-0.234 -0.500 -1.875 0.000
4 changes: 4 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-d.in
Original file line number Diff line number Diff line change
@@ -0,0 +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.125
2 changes: 2 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-d.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
0.000 0.484 0.000 -0.125
0.000 -0.484 0.000 0.125
4 changes: 4 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-e.in
Original file line number Diff line number Diff line change
@@ -0,0 +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.125
2 changes: 2 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-e.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-0.250 0.453 -2.000 -0.375
0.250 -0.109 2.000 3.125
4 changes: 4 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-f.in
Original file line number Diff line number Diff line change
@@ -0,0 +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.125
2 changes: 2 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-f.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-0.094 0.781 -0.750 2.250
0.406 -0.312 3.250 1.500
4 changes: 4 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-g.in
Original file line number Diff line number Diff line change
@@ -0,0 +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.125
2 changes: 2 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-g.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-0.250 0.438 -2.000 -0.500
0.250 -0.094 2.000 3.250
5 changes: 5 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-h.in
Original file line number Diff line number Diff line change
@@ -0,0 +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.125
0.125
4 changes: 4 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-h.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-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
5 changes: 5 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-i.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
3.000 3.000 3.000 1.000 1.000 2.000 3.000 2
1.000 -0.500 -1.500 1.500
-1.000 0.500 -1.000 1.000
0.125
0.125
4 changes: 4 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-i.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
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
7 changes: 7 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-j.in
Original file line number Diff line number Diff line change
@@ -0,0 +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.125
0.125
0.125
0.25
8 changes: 8 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-j.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
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
3 changes: 3 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-k.in
Original file line number Diff line number Diff line change
@@ -0,0 +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.125
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.133 0.500 1.062 0.000
6 changes: 6 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-l.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
1.000 0.000 0.000 0.000 1.000 0.000 0.000 3
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.125
0.125
6 changes: 6 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-l.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
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
9 changes: 9 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-m.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
0.000 3.000 1.000 0.000 1.000 2.000 1.100 5
0.500 0.500 0.000 0.000
-0.500 -0.500 0.000 0.000
-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.125
0.125
0.125
15 changes: 15 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-m.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
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.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.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
11 changes: 11 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-n.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
100.000 100.000 100.000 100.000 0.000 0.000 0.000 5
1.234 5.678 0.000 0.000
4.321 8.765 0.000 0.000
5.678 1.234 0.000 0.000
8.765 4.321 0.000 0.000
1.234 4.321 0.000 0.000
0.010
0.100
0.001
1.000
321.123
25 changes: 25 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-n.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
1.234 5.678 0.000 0.000
4.321 8.765 0.000 0.000
5.678 1.234 0.000 0.000
8.765 4.321 0.000 0.000
1.234 4.321 0.000 0.000
1.234 5.678 0.000 0.000
4.321 8.765 0.000 0.000
5.678 1.234 0.000 0.000
8.765 4.321 0.000 0.000
1.234 4.321 0.000 0.000
1.234 5.678 0.000 0.000
4.321 8.765 0.000 0.000
5.678 1.234 0.000 0.000
8.765 4.321 0.000 0.000
1.234 4.321 0.000 0.000
1.234 5.678 0.000 0.000
4.321 8.765 0.000 0.000
5.678 1.234 0.000 0.000
8.765 4.321 0.000 0.000
1.234 4.321 0.000 0.000
1.234 5.678 0.000 0.000
4.321 8.765 0.000 0.000
5.678 1.234 0.000 0.000
8.765 4.321 0.000 0.000
1.234 4.321 0.000 0.000
9 changes: 9 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-o.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
2.000 1.000 1.000 1.000 2.000 2.000 2.000 7
0.500 0.500 0.000 0.000
-0.500 -0.500 0.000 0.000
-0.500 0.500 0.000 0.000
0.500 -0.500 0.000 0.000
0.000 0.000 0.000 0.000
1.000 0.000 0.000 0.000
-1.000 0.000 0.000 0.000
256.000
7 changes: 7 additions & 0 deletions artificialintelligence/assignments/flocking/tests/test-o.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-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
425341.933 0.000 1661.488 0.000
-425341.933 0.000 -1661.488 0.000
31 changes: 31 additions & 0 deletions artificialintelligence/assignments/genai/index.html

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions artificialintelligence/assignments/index.html

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions artificialintelligence/assignments/life/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
add_executable(ai-life life.cpp)

file(GLOB TEST_INPUT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/tests/*.in)
file(GLOB TEST_OUTPUT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/tests/*.out)

add_custom_test(ai-life-test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ai-life "${TEST_INPUT_FILES}" "${TEST_OUTPUT_FILES}")

23 changes: 23 additions & 0 deletions artificialintelligence/assignments/life/index.html

Large diffs are not rendered by default.

Empty file.
4 changes: 4 additions & 0 deletions artificialintelligence/assignments/life/tests/test-a.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
3 3 2
.#.
.#.
...
3 changes: 3 additions & 0 deletions artificialintelligence/assignments/life/tests/test-a.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
...
...
...
6 changes: 6 additions & 0 deletions artificialintelligence/assignments/life/tests/test-b.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
5 5 16
.....
..#..
...#.
.###.
.....
5 changes: 5 additions & 0 deletions artificialintelligence/assignments/life/tests/test-b.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.#...
..#..
###..
.....
.....
5 changes: 5 additions & 0 deletions artificialintelligence/assignments/life/tests/test-c.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
4 4 9
....
.##.
.##.
....
4 changes: 4 additions & 0 deletions artificialintelligence/assignments/life/tests/test-c.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
....
.##.
.##.
....
6 changes: 6 additions & 0 deletions artificialintelligence/assignments/life/tests/test-d.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
5 5 5
.....
..#..
..#..
..#..
.....
5 changes: 5 additions & 0 deletions artificialintelligence/assignments/life/tests/test-d.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.....
.....
.###.
.....
.....
6 changes: 6 additions & 0 deletions artificialintelligence/assignments/life/tests/test-e.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
6 5 4
......
......
.###..
...#..
......
5 changes: 5 additions & 0 deletions artificialintelligence/assignments/life/tests/test-e.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
......
..##..
.#..#.
..##..
......
Loading

0 comments on commit a2d2a9f

Please sign in to comment.