Designing a 2d autonomous system

Click For Summary
SUMMARY

The discussion centers on designing a discrete autonomous system similar to cellular automata using a 2D grid of cells with specific attributes and functions. Participants suggest programming languages and tools, debating between C++ with OpenGL, Python, and mathematical visualization programs like MatLab and Mathematica. Python is recommended for beginners due to its ease of use and good programming practices, while Java is noted for its historical strength in GUI applications. Resources such as "Computer Simulations with Mathematica" and Processing are mentioned as valuable for further exploration.

PREREQUISITES
  • Basic understanding of cellular automata concepts
  • Familiarity with programming languages such as Python, C++, or Java
  • Knowledge of graphics rendering techniques, particularly OpenGL
  • Awareness of GUI development frameworks and libraries
NEXT STEPS
  • Learn Python 3.x for programming autonomous systems
  • Explore C++ GUI frameworks compatible with OpenGL
  • Research MatLab and Mathematica for mathematical visualization techniques
  • Investigate Processing for creating visual simulations
USEFUL FOR

Programmers interested in developing autonomous systems, game developers exploring cellular automata, and researchers looking for mathematical visualization tools.

Krunchyman
Messages
35
Reaction score
15
I want to create a programming project that involves creation of a discrete autonomous system. It is very similar to cellular automaton as the simulation environment is composed of 2D cells on an unbounded grid. Cells have attributes assigned to them which makes them behave and function together as a self-sustaining system. For example, cells are programmed with basic functions such as moving and dividing and specialized tasks that they must perform such as energy retrieval, synthesis and storage, defense and information storage.

To design the system and its rules, I'll need a programming language and a graphics rendering program. Should I use a general purpose programming language such as C++ coupled with OpenGL to render graphics or should I use a program designed for mathematical visualization such as MatLab or Mathematica?

I don't know Mathematica/MatLab and I only know a little bit of C++ so I would not start this project any time soon but I would like to know the prerequisites of creating it.
 
Technology news on Phys.org
Krunchyman said:
I don't know Mathematica/MatLab and I only know a little bit of C++ so I would not start this project any time soon but I would like to know the prerequisites of creating it.

How much processing power do you need? If you can get away with a little less efficient use of your CPU and memory (i.e. in 9 out of 10 cases), I suggest learning Python. It teaches good programming habits and is surprisingly easy to learn and use. There's of course also the fact that if you're a beginner in programming, you won't write extremely efficient code in C anyway.
 
Hobin said:
How much processing power do you need? If you can get away with a little less efficient use of your CPU and memory (i.e. in 9 out of 10 cases), I suggest learning Python. It teaches good programming habits and is surprisingly easy to learn and use. There's of course also the fact that if you're a beginner in programming, you won't write extremely efficient code in C anyway.

My computer has an adequate CPU and very good memory as well. I have also run complex GoL simulations without any problem. I am actually not new to programming, seeing as I've written a lot of C# programs before.

Python still seems like a good idea however, and I am planning on learning the language. Should I first learn Python 2 or 3? I was thinking 2 due to it being generally older and more stable.
 
Last edited:
Python also provides several reliable GUI libraries for you create simulation applications while I still think you may need to go into Java world a little. You have the basics of C#, entering Java for multi-agent/autonomous systems would never cause you any troubles. The reason I tell you so because Java has been originally well-known as a GUI provider for decades, long before its brother Borland C++, and its son MS' C# were born. Many academic applications and those for research purposes are originally written in Java. If you would want to use C++, you will probably also need a C++ GUI tool/framework since OpenGL alone may not be enough.
 
You can get existing GUI systems that lay on top of OpenGL or DirectX in C++ if you wish. In fact all game engines with UI support will have this kind of functionality already in-built.

The benefit of some of these is that if the GUI takes advantage of the 3D environment, you can have a 3D GUI and do all the things in the GUI that you can in a normal rendering environment like transparency, shaders and so on.

If you want to get fancy, this is how you do it. Also I think if you look hard enough you'll find someone's already done this and posted it as an open source library or project.
 
Krunchyman said:
I am actually not new to programming, seeing as I've written a lot of C# programs before.

May I ask why you don't want to use C# to create this system? It's not my favourite language, but I think it would be powerful enough to do this job, too.

Krunchyman said:
Python still seems like a good idea however, and I am planning on learning the language. Should I first learn Python 2 or 3? I was thinking 2 due to it being generally older and more stable.

Popular opinion states you should learn 2.7.x first. I disagree, because I think if you learn 3.x you will a. be familiar with the newer (ergo: proper) syntax, and b. be able to program in 2.7.x with only a few minor changes (which you can look up on the internet quite easily). It should be noted, though, that many libraries have not yet been converted to work properly under Python 3, so it's highly preferable to at least be familiar with both.
 
Krunchyman said:
I want to create a programming project that involves creation of a discrete autonomous system.
...
should I use a program designed for mathematical visualization such as MatLab or Mathematica?

I don't know Mathematica

If you can find a copy of "Computer Simulations with Mathematica" by Gaylord and Wellin in any of the libraries you have access to then that entire book is on the subject that you are looking at, along with lots of examples, code, etc. It includes documentation on linking to external compiled C code. That is somewhat old, but it should provide good general advice while you are still planning on what direction to go.
 
Sounds like a good fit for Processing: http://processing.org/

Here's an example of GoL in Processing: http://processing.org/learning/topics/conway.html
 
Last edited by a moderator:
Thanks for the input, everyone. I haven't made a decision to what I'm going to do yet but I will use the advice here as a guideline.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 21 ·
Replies
21
Views
3K
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
7K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
Replies
8
Views
8K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K