Designing a 2d autonomous system

In summary: 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 Python 3 before attempting to use it.
  • #1
Krunchyman
35
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
  • #2
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.
 
  • #3
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:
  • #4
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.
 
  • #5
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.
 
  • #6
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.
 
  • #7
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.
 
  • #8
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 [Broken]
 
Last edited by a moderator:
  • #9
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.
 

1. What is a 2d autonomous system?

A 2d autonomous system is a system that operates independently and continuously in a two-dimensional space without any external input or control. It is designed to make decisions and carry out actions based on its own internal programming and sensors.

2. What are the key components of designing a 2d autonomous system?

The key components of designing a 2d autonomous system include a control algorithm, sensors, actuators, power source, and communication system. The control algorithm is responsible for making decisions based on sensor inputs, while the sensors gather information about the system's environment. The actuators carry out the desired actions, and the power source provides energy for the system to function. The communication system allows the system to send and receive information.

3. How is machine learning used in designing a 2d autonomous system?

Machine learning is often used in designing a 2d autonomous system to improve its decision-making capabilities. By training the system with large amounts of data, it can learn to make more accurate and efficient decisions based on its past experiences.

4. What are the potential benefits of using a 2d autonomous system?

The potential benefits of using a 2d autonomous system include increased efficiency, reduced human error, and improved safety. These systems can also operate in environments that may be too dangerous or difficult for humans to access.

5. What are the ethical considerations when designing a 2d autonomous system?

Some ethical considerations when designing a 2d autonomous system include ensuring the safety of others, avoiding bias in decision-making, and considering the potential impact on human labor and employment. It is important to carefully consider these factors and address any potential issues before implementing an autonomous system.

Similar threads

  • Programming and Computer Science
Replies
6
Views
1K
Replies
2
Views
793
  • Programming and Computer Science
Replies
4
Views
5K
  • STEM Academic Advising
Replies
12
Views
1K
  • Programming and Computer Science
Replies
10
Views
2K
  • Programming and Computer Science
Replies
1
Views
2K
  • Sticky
  • Programming and Computer Science
Replies
13
Views
4K
  • Set Theory, Logic, Probability, Statistics
2
Replies
40
Views
6K
Replies
4
Views
1K
Back
Top