ArtificialLife:在计算机科学硕士课程“ Artificial Life”中完成的编程作业,使用Python和Jav

  • I6_532608
    了解作者
  • 1.9MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-03 21:04
    上传日期
课程“人为生活”编程作业 使用Java或C ++在计算机科学硕士课程“人为生活”中完成编程任务。 编程作业:A 实现一个具有k = 2状态{0,1},邻域半径为r = 1或r = 2的一维元胞自动机,以及84个像元。 边界单元j = 0,j = 1,j = 82,j = 83应固定为内容aj =0。程序应在每一行中将所有84个单元的完整状态描述为文本控制台ASCII输出。 为CA实施两个可能的起始条件:S:一个种子(所有单元都是空的,但单元号为42,ai = 42 = 1),以及R:随机启动条件,每个单元的概率设置为p = 0.5。 让用户在运行时输入:邻域半径r,CA的规则(Wolfram符号)和起始条件(S或R)。 请使用C,C ++或Java来实现您的程序。 发送一封电子邮件给您的导师,其中包含文档化的源代码,如何编译和运行程序的说明(例如,提供命令)以及至少包含10行结果的
ArtificialLife-master.zip
  • ArtificialLife-master
  • ForestFireModel
  • ForestFireModel.java
    6.2KB
  • Instructions.txt
    793B
  • SampleResults.txt
    314B
  • Screenshot.png
    577.1KB
  • ForestFireModel.class
    3.3KB
  • Predator-Prey
  • Predator-Prey.py
    5.1KB
  • Instructions.txt
    779B
  • StableOsscilation_extendedterms.png
    429.3KB
  • Program_Screenshot.png
    760.3KB
  • StableOsscilation_withoutextendedterms.png
    342.2KB
  • LICENSE
    1KB
  • README.md
    4.3KB
  • .gitignore
    149B
  • 1D-CellularAutomata
  • RandomCollection.class
    1.3KB
  • CellularAutomata.class
    2.9KB
  • RandomCollection.java
    722B
  • Results.txt
    3.5KB
  • Instructions.txt
    626B
  • CellularAutomata.java
    4.4KB
内容介绍
# Course "Artificial Life" Programming Assignments Programming assignments done in Masters In Computer Science course "Artificial Life", using Java or C++. ## Programming Assignment: A Implement a **1-dimensional cellular automaton** with the k = 2 states {0, 1}, with a neighborhood radius of r = 1 or r = 2, and 84 cells. The boundary cells j = 0, j = 1, j = 82, j = 83 shall be fixed to the content aj = 0. The programm shall depict in every line the complete state of all 84 cells as text console ASCII output. Implement two possible starting conditions for the CA: S: a seed (all cells are empty but cell no 42, ai=42 = 1), and R: random starting condition, each cell is set with a probability of p = 0.5. Let the user enter at runtime: the neighborhood radius r, the rule for the CA (Wolfram Notation), and the starting condition (S or R). Please use C, C++, or Java to implement your program. Send an E-Mail to your tutor containing the documented source code, a description how to compile and run your program (e.g. give the commands), and a file containing at least 10 lines of result. ## Programming Assignment: B Implement a two-dimensional (d=2) (Cellular) Automaton on a 101 × 82 sized, rectangular grid. Use a torus toplogy to manage the boundary of the grid. If you use console output (ASCII-art) take characters that are aligned with the content they represent and that are easy to distinguish from each other. You can choose if you would like to implement Langton’s Ant, Conway’s Game of Life or the probabilistic Cellular Automaton called “Forest Fire”. ### Langton’s Ant: Make the user choose the initial configuration of the grid from the following list of 5 possibilities: all white, all black, checker board, horizontal stripes, random setting and make the user chose the starting position and orientation for the ant. Write the total number of cells living for each time step into a file (one ASCII value per line). ### Conway’s Game of Life: Make the user choose the initial pattern to start with, from the following list of 5 possibilities: blinker, glider, r-pentomino, Gosper’s Glider Gun, and a pattern (class 3 or 4) of your own choice. Write the total number of cells living for each time step into a file (one ASCII value per line). ### Forest Fire Model: (I implemented this) Make the user set the probabilistic parameters p, f, q. Start with an empty field (all cells are in state Ashes). Write the number of cells for each state (Ashes, Tree, Fire) for each time step into a file (three values per line, ASCII format, separated by blanks). Implement your program using C, C++, or Java: Make sure your program can be compiled and started from a console, or a terminal; using an IDE is fine for developing, but make sure the final program can be operated without the IDE. Send an E-Mail to your tutor containing the documented source code and a description how to compile and run your program from the console (no IDE). ## Programming Assignment: C Write a C, C++, or Java Programm, that implements a **Predator-Prey**, Activator-Inhibitor System with an iterated function. Please notice, that it is reasonable to work with real values (type double). Find a set of starting conditions for x(0) and y(0) and a set of parameters a, b, c, d, e, f that will yield an almost stable oscillation. Determine the mean population size ¯x, y¯ for prey and predator when the system has reached an almost stable oscillation. Increase the parameter a a bit. How is the influence of a on the mean values ¯x, y¯? **x(i + 1) = x(i) + a ∗ x(i) + b ∗ y(i) + e ∗ x(i) ∗ x(i)** **y(i + 1) = y(i) + c ∗ x(i) + d ∗ y(i) + f ∗ y(i) ∗ y(i)** Draw the temporal development x(i), and x(i) of a stable oscillation with respect to the iteration number i, and draw a so-called phase plot, where y(i) is plotted against x(i) in a two dimensional diagram. Use the program Gnuplot to draw this graph, and hand in the respective Gnuplot commands. Extend the equations by two further terms, redo the steps above for the altered system and describe some of the major differences. **x(i + 1) = x(i) + a ∗ x(i) + b ∗ y(i) + e ∗ x(i) ∗ x(i) + g ∗ x(i) ∗ y(i)** **y(i + 1) = y(i) + c ∗ x(i) + d ∗ y(i) + f ∗ y(i) ∗ y(i) + h ∗ x(i) ∗ y(i)** Make sure your program is running correctly, and that you have sensible and resonable comments in your sourcecode
评论
    相关推荐
    • JAVAPython学习
      JAVA讲义、Python详细学习PPT
    • python/java
      一些pythonjava的调用方法,大家可以参考下
    • AutoTestBySelenium:的javapython
      自动测试 Java / Python
    • SocketTutorial:JavaPython 套接字教程 (10152014)
      虽然我已经包含了用于在 PythonJava 中设置服务器的文件,以及在 PythonJava 中设置客户端的文件,但我打算只介绍带有 Java 客户端的 Python 服务器。 随意玩这些。 在阅读相应的网络版本。 ##教程: ...
    • getidents:从源代码中提取标识符(JavaPython
      Java / Python源代码中提取标识符。 它能做什么 输入(Java) public class Hello { public static void main(String[] args) { String name = args[0]; System.out.println("Hello, "+name); } } 输出...
    • python调用java
      python调用java
    • 反编译工具(适合java python)好用
      老大用了50积分下载的,哈哈 被我拿出来分享了,找了很多的.解压就能直接用 很方便的 有需要的拿去吧
    • java开发python相关包
      有时候,pythonjava程序更好用,但是有时候还是java实用。name在用java中操作python,这个包就可以了
    • pythonjava
      python代码转java工具,没有用过不知行不行,如果你试用了评论一下告诉后来人。
    • Java调用Python.zip
      Java调用python传递参数并接收返回值,这是一个Java调用Python的实验程序,你可以直接下载运行。