Skip to content

Would an AI system replace an ns-3/ns-2 Developer or an Expert?

Introduction.

While starting to learn ns-3 from its very first release, it was impossible for me to understand it for some inexpressible reasons. I explained “why it took around 10 years for me” to really understand ns-3 in [5].

But today, we are having free, AI-based teachers who can really teach things very elegantly and patiently.

This article discussed the possibility of using large language models(LLMs) based AI systems in designing and implementing simulation code for open-source simulators. Further, this will address the possibility of using such AI to assist us in the development of complex, novel, state-of-the-art algorithms for a simulator such as ns-3.

A few months back, one fine morning, my son claimed that there will not be any need for the ‘so-called’ experts to provide support in writing complex, research-oriented network simulations and any code in general.  He told that he is using an AI system to assist him in his coding tasks related to a Web3-based blockchain technology.

He introduced me to ChatGPT, the AI system that is revolutionizing the world.

As proof of his claim, he demonstrated it with some examples of his own on his laptop.

But I told him that, possibly, it can only be able to write some basic programs and will never be able to write a complex, really working, networking protocol for a simulator such as ns-2, ns-3, and Omnet++.

To prove my point, first I told him to put the following ‘prompts’ at the ChatGPT interface. (even though ChatGPT will mostly give different replies, I try to present some replies of it that I received today)

Experiment 1: A Simple Matrix Multiplication

For a generic prompt like Give an example of matrix multiplication in ‘C’ language”, it really gave a very big program that was elegantly written. So, to simplify the task, I give the following text prompt.

 

Text Prompt:  ‘Give a simple, minimal, working example program for matrix multiplication in ‘C’ language.’

See the ChatGPT interface:

Kindly notice the tone of ChatGPT : “Certainly! Here’s a minimal working example of matrix multiplication in the C language:”

 

Anyway, the following is the complete code that ChatGPT provided :

 


#include <stdio.h>

#define ROWS_A 2
#define COLS_A 2
#define ROWS_B 2
#define COLS_B 2

void matrixMultiply(int A[][COLS_A], int B[][COLS_B], int C[][COLS_B]) {
    int i, j, k;

    for (i = 0; i < ROWS_A; ++i) {
        for (j = 0; j < COLS_B; ++j) {
            C[i][j] = 0;
            for (k = 0; k < COLS_A; ++k) {
                C[i][j] += A[i][k] * B[k][j];
            }
        }
    }
}

void displayMatrix(int matrix[][COLS_B]) {
    int i, j;

    for (i = 0; i < ROWS_A; ++i) {
        for (j = 0; j < COLS_B; ++j) {
            printf("%d ", matrix[i][j]);
        }
        printf("\n");
    }
}

int main() {
    int A[ROWS_A][COLS_A] = {{1, 2}, {3, 4}};
    int B[ROWS_B][COLS_B] = {{5, 6}, {7, 8}};
    int C[ROWS_A][COLS_B];

    matrixMultiply(A, B, C);

    printf("Matrix A:\n");
    displayMatrix(A);

    printf("\nMatrix B:\n");
    displayMatrix(B);

    printf("\nResult:\n");
    displayMatrix(C);

    return 0;
}

In fact, ChatGPT abstractly explained the logic of the code as well:

In this minimal example, we have two 2×2 matrices A and B. The matrixMultiply function performs the matrix multiplication and stores the result in the matrix C. The displayMatrix function is used to display the contents of the matrices. In the main function, the matrices A, B, and C are initialized, matrix multiplication is performed, and the matrices are displayed before and after the multiplication.

 

Of course, the code is getting compiled without any errors and working well.

Now I asked my son to put the same prompt by only changing the programming language, like:

 

Text Prompt:  ‘Give a simple, minimal, working example program for matrix multiplication in ‘C++’ language.’

Text Prompt:  ‘Give a simple, minimal, working example program for matrix multiplication in ‘Python’ language.

Text Prompt:  ‘Give a simple, minimal, working example program for matrix multiplication in ‘Java‘ language.

…..

…..

Text Prompt:  ‘Give a simple, minimal, working example program for matrix multiplication in ‘Tcl’ language.

ChatGPT was able to give buildable/runnable code for almost all such above text prompts.

 

Now, my some smiled at me and said,  ‘That’s what I told you, Dad!’.

He started to believe that his claim is correct.

 

Experiment 2: Fuzzy Logic in ns-3

To disprove him, now I asked him to put a new text prompt at ChatGPT interface.

 

Text Prompt:  ‘Give a simple, minimal, working example of a simulation to use Fuzzy Logic in ns-3‘.

 

Now notice the tone of ChatGPT:

I apologize, but it seems there has been a misunderstanding. ns-3 is a discrete-event network simulator, and it doesn’t have built-in support for fuzzy logic. Fuzzy logic is a mathematical framework used to handle uncertainty and approximate reasoning, often applied in control systems.

If you’re looking for a simulation involving fuzzy logic, you would typically need to implement the fuzzy logic system yourself within the simulation framework you’re using, such as ns-3. This would involve designing the fuzzy logic rules, membership functions, and inference mechanisms specific to your application.

However, I can provide you with a minimal example of a fuzzy logic system implemented in C++ using the FuzzyLite library. This example doesn’t directly integrate with ns-3 but can serve as a starting point for understanding fuzzy logic concepts and implementation. Here’s the example:

The ChatGPT’s version of the code goes like this:

If you know the fundamentals of ns-3 simulation, you can understand that it is not an ns-3 simulation, and compiling this code will need a lot of understanding on installing and using an external library such as FuzzyLite that ChatGPT is proposing.

I told my son to change the text prompt as per his wish and try to make ChatGPT to give somewhat meaningful ns-3 code. Simply ChatGPT apologies in different ways and gave different suggestions and some non-buildable simulation code with different kinds of declarations that indirectly said “This code will never get compiled”

I apologize for the confusion, but as mentioned earlier, ns-3 doesn’t have built-in support for fuzzy logic. It is primarily focused on network simulations and doesn’t provide a direct integration with fuzzy logic systems.

If you want to combine ns-3 with a fuzzy logic system, you would need to implement it yourself. This involves developing a custom module within ns-3 that integrates both the network simulation and the fuzzy logic system. Here are the general steps you would need to follow:

  1. Familiarize yourself with ns-3: Understand the basics of ns-3 network simulation framework, including how to create network topologies, configure protocols, and simulate network behavior.
  2. Implement the fuzzy logic system: Utilize a fuzzy logic library or implement your own fuzzy logic system within the ns-3 simulation module. This involves defining fuzzy input/output variables, membership functions, fuzzy rules, and inference mechanisms.
  3. Integrate fuzzy logic with ns-3: Create a custom module within ns-3 that incorporates the fuzzy logic system into the network simulation. This may involve using hooks or callbacks to interact between the network events and the fuzzy logic system, allowing the system to make decisions based on fuzzy inputs.
  4. Run the simulation: Execute the ns-3 simulation with the integrated fuzzy logic module. Observe how the fuzzy logic system influences the network behavior and analyze the results accordingly.

Implementing a full-fledged ns-3 simulation with fuzzy logic integration can be a complex task that requires a good understanding of both ns-3 and fuzzy logic concepts. I would recommend referring to the ns-3 documentation and tutorials, as well as studying fuzzy logic principles and libraries to successfully accomplish this task.

Experiment 3: Payroll System

My son got confused and asked a question: “Are you saying that ChatGPT can not write code for a big application?”.

I said, “No. “Of course, it can be”

For example, if you give a text prompt like : Write a simple ‘Payroll System” in C++

It will definitely give a working program of a simple Payroll System.

My son tried it and ChatGPT was able to give a working code for a ‘Payroll System” in C++

 

I told my son to try similar test prompts by changing the programming language.

Almost all the time, ChatGPT was able to give a simple, meaningful ‘Payroll System” in almost any programming language of the world.

 

Why was the Present LLMs-based AI Could not able to provide a working ns-3 code in most of the cases?

Based on my interactions and experiments I can say the reason:

It is OVERTHINKING and tends to be EXTREMELY CREATIVE.

It has a large source of information – I mean, possibly it has been trained with a lot of information, particularly about simulations and simulators. Because of this huge knowledge/information, it is overthinking and overcreative.

For example, if you ask it to write a few lines of code to use a particular MAC Device in a simulation, sometimes it will give hypothetical, syntactically incorrect lines of ns-3 code. The reason is: it has been trained with the information about different versions of ns-3. So, with that vast amount of ‘mixed up’, information, the trained model was able to provide a code in a ‘superior syntax’ that could not be compiled with any existing version of ns-3.

In some cases, it is giving a ns-3 code with an elegant solution by using some ‘ideal’, functions – but those functions/objects are nonexistent in any version of ns-3. Then how it is using those functions? Possibly, it learned to use them from its knowledge of other simulators such as Omnet++. Yes. it is writing logically correct code by calling some ‘ideal’ functions and using some ideal class names/objects/variables, but they are simply nonexistent ones on any versions of ns-3.

One day, every piece of code that an LLMs-based AI writes will work on an ns-3 simulator – but in that case, that modified version of the ns-3 simulator(created at that instant) itself will be the creation of an AI. Hopefully, it will not happen in the near future.

So, for the present, we need to think and do such ns-3 tasks on our own😊.

Threats on the Present Educational System

Of course, a large language models-based AI system could provide a direct, exclusive ‘answer sheet’ for most of the class assignments. It can able to generate an entire essay that can be in a ready-to-submit format for a class assignment. Particularly, a small programming assignment, it can provide unique, custom-made,  ‘runnable’ code that will be ready to submit format.

I saw a post on another Google user group in which a student asked about an error in a simulation script. That student may be trying to resolve that error for quite some time. It may be a class assignment or a small project work assignment. Of course, getting some support from an AI is not ethically wrong. But what happened was, that code was generated by an AI system with a few missing pieces. The student was struggling with that code and only focusing on the error that he/she was getting. Even if he is able to correct those errors, still that code will not do the intended work.  So, instead of struggling for a long time with a code that AI created, he/she may learn the fundamentals on his/her own, with the help of a tutorial/book, to design that simulation as per the need. At least such simple tutorials/books will help them to correct the errors that they face with the AI-generated code and will help them to realize the missing pieces in that code and make the code to do the intended task.

The use of such AI systems is unavoidable. Of course, they will simply be able to replace a ‘tutor’ in several ways. They will transform the learning experience of the future and bring it to a superior level. So, the evaluation methods that the universities/colleges/teacher are using for ‘validating the skills and knowledge’ of a student should get change in the near future.

It is possible to cheat the present educational system in the following :

  • Essay assignments are given to students of all disciplines
  • Preparing a project or research Proposal (with hypothetical ideas)
  • Even, for preparing progress reports on such hypothetical projects or research proposals
  • It is possible to create ‘fake and attractive’ diagrams, flow-charts for such progress reports, thesis on such hypothetical projects or research proposals
  • It is possible to prepare some ‘interim simulation code’ to show it as a proof of concept and proof of ongoing work in phase reports, and doctoral committee meeting reports.

There is no way to prevent a student from using such a wonderful AI system. Preventing its usage may be unethical because a student tends to use such AI systems because their curriculum or teacher has not provided sufficient knowledge for them to face such problems on their own.  So, the new AI can be used to complete genuine assignments, projects, or research submissions in a more genuine way with some novelty in it.

List of Jobs on Threat

According to [1] ChatGPT could potentially replace or bring changes to some of the tech jobs such as:

  • Technical writers
  • Data entry clerks
  • Customer service representatives
  • Copywriters
  • Social media managers
  • Content creators
  • Translators
  • Legal assistants
  • Research assistants
  • Administrative assistants

ChatGPT itself stated the following:

As an AI language model, ChatGPT has the potential to bring changes to various tech jobs and industries. Here’s a list of some tech jobs that could be impacted by AI like ChatGPT:

  1. Customer Support Representative: ChatGPT can handle basic customer queries and provide automated responses, reducing the need for human customer support representatives.
  2. Content Writer: ChatGPT can generate human-like text, including articles, blog posts, and product descriptions, potentially reducing the demand for human content writers.
  3. Data Entry Operator: With its ability to understand and process large amounts of information, ChatGPT can automate data entry tasks, making human data entry operators less necessary.
  4. Language Translator: ChatGPT can assist with language translation tasks, although human translators are still needed for accurate and context-specific translations.
  5. Virtual Assistant: ChatGPT can act as a virtual assistant, providing information, performing tasks, and assisting with scheduling, potentially reducing the demand for human virtual assistants.
  6. Technical Support Specialist: ChatGPT can offer basic troubleshooting and technical support, reducing the need for human technical support specialists for simple issues.
  7. Market Research Analyst: ChatGPT can assist in gathering and analyzing market data, potentially reducing the time and effort required by human market research analysts.
  8. Legal Researcher: ChatGPT can assist with basic legal research tasks, helping to streamline the process for legal researchers, although human expertise is still required for complex legal matters.
  9. Content Moderator: ChatGPT can aid in content moderation tasks by identifying potentially inappropriate or harmful content, reducing the workload for human content moderators.
  10. Data Analyst: ChatGPT can assist with data analysis tasks by generating insights and visualizations, potentially augmenting the work of human data analysts.

It’s important to note that while AI technologies like ChatGPT can automate certain aspects of these jobs, they are also capable of complementing human work, freeing up time for more complex and creative tasks. Additionally, some jobs heavily rely on human empathy, critical thinking, and decision-making skills, which are difficult to replicate fully with AI.

Will AI replace writers, thinkers?

The following are the interesting facts that should be noted from the interview of the psychologist Steven Pinker to ‘The Harvard Gazette’ [2],

“it’s impressive; will have uses, limits; may offer insights into nature of human intelligence”

“We’re dealing with an alien intelligence that’s capable of astonishing feats, but not in the manner of the human mind,”

” Just as we had to acknowledge our own limited memory and calculation capabilities, we’ll acknowledge that retrieving and digesting large amounts of information is something that we can do well but artificial minds can do better.”

‘For 25 years I’ve begun my introductory psychology course by showing how our best artificial intelligence still can’t duplicate ordinary common sense. This year I was terrified that that part of the lecture would be obsolete because the examples I gave would be aced by GPT.  But I needn’t have worried. When I asked ChatGPT, “If Mabel was alive at 9 a.m. and 5 p.m., was she alive at noon?” it responded, “It was not specified whether Mabel was alive at noon. She’s known to be alive at 9 and 5, but there’s no information provided about her being alive at noon.” So, it doesn’t grasp basic facts of the world’

Steven Pinker’s replies gave some hope for the future existence of ns-2/ns-3 experts, at least for the time being. To confirm this, I asked Steven Pinker’s question again with ChatGPT, and it was a little relief to me.

 

But the reply of Google’s Bard AI for the same question was amazing – even it gave a simple Python script to verify this. It may again make Steven Pinker and everyone to rethink about capabilities of humans and AI. Because, it seems that, AI started to grasp the basic facts of the world.

My Simple Turing Test

To prove the inability of transformers-based AI systems, or simply prove it as an idiot AI, I asked the following question with Bard as well as ChatGPT.

Text Prompt:

When I was walking towards a junction, I heard a barking dog at my left. I looked at that dog. It was tied in front of a house at the east. On arriving at the junction, I turned 90 degrees right and walked in that direction. That path directly took me to the front doors of a temple.

What direction that temple is facing?


Both Bard as well as ChatGPT were unable to provide the correct answer to the above question (Can you guess the correct answer?). If I slightly modified the text prompt/question, sometimes, they were able to give correct answers with entirely wrong or meaningless logic.

So, I think, always there will be a ‘Turing Test’ in which a man-made intelligence/robot will invariably fail.

Even in parallel supercomputers, things happen in a somewhat serial fashion. But in nature, every single interaction is happening “effortlessly” in parallel. So, present-day computers are only trying to mimic complex parallel mechanisms with their poor serial computing capabilities. In a living organism or any entity in nature, things happen in parallel at the quantum level. The present-day computers are in capable of simulating things happening even in a simple molecule with quantum-level accuracy. So these computers will never be able to simulate any simple reality with 100% similarity/accuracy. A man-made computer software is just a “serial program” running on a parallel computer in a very serial fashion. But in nature, everything is ‘effortlessly’ happening in parallel.
So, any such simulated “intelligence” or “life” will always be robotic, since it will lack the very nature of parallelism in its design.

Would an AI system replace an ns-3/ns-2 Developer or an Expert?

The following is the answer from ChatGPT itself :

It is unlikely that an AI system would completely replace an ns-3/ns-2 developer or expert in the near future. While AI technologies continue to advance rapidly, they are not yet capable of fully replicating the expertise, experience, and problem-solving abilities of human developers and experts in specialized domains like network simulation (ns-3/ns-2). These developers and experts possess a deep understanding of the underlying principles, algorithms, and intricacies of the simulation tools. They also have the ability to adapt and innovate in response to new challenges and requirements.

However, AI systems can augment the work of developers and experts by automating certain tasks, assisting with data analysis, providing insights, and speeding up the development process. AI can be utilized to optimize simulations, explore large parameter spaces, and aid in performance analysis. It can also help with identifying patterns and anomalies in simulation results. Therefore, while AI may not replace ns-3/ns-2 developers or experts entirely, it can certainly enhance their capabilities and productivity.

Bard also provided the same kind of response.

Conclusion

Based on my interactions with LLMs-based AI, the current systems are unable to effectively solve complex research problems faced by scholars or researchers who use software like ns-3 to implement their ideas. For a research scholar or student, these AI systems cannot ‘magically’ create a simulation code that works perfectly;  particularly if their research problem is complex and novel.

According to my belief, if you ask a question on ns-3 with an AI system,

  • certainly it could not be able to provide the answer in the hilarious and brilliant way as Tommaso Pecorella does. As a good mentor and a responsible teacher, Tommaso will not ‘out’ the answer sheet, instead, he will make one learn and realize things on their own.
  • certainly, it could not be able to provide a few lines of working code like Tom Anderson; because it doesn’t knows the fine differences between different versions of ns-3.
  • certainly, it will not provide an in-depth answer like Gabriel Ferreira for resolving a compilation error; because it is certainly not aware that much on this.
  • certainly, it will never be able to create and provide an ns-3 extension like 5G-NR or able to explain it like Biljana Bojovic
  • (like me,) It will never be able to grasp the elegance in the design of ns-3 and provide a visualization tool such as NetSimlyzer. As a human, Evan Black had a clear picture of the overall architecture of ns-3 in his mind – that’s why it was possible for him and his team to provide such a huge 3D visualization tool and make it useable only by inserting a few lines of code in an existing ns-3 simulation. Marvelous Integration!

I believe that, at least, the present LLMs-based AI could not able to teach anything innovative on ns-3 to the core developers of ns-3. Of course, AI could provide some ‘help’ for brilliant developers by being a ‘quick reference’ textbook; but never will be able to replace them.

It may be possible to train one such AI, only on one particular version of ns-3, and make it able to provide ‘accurate’ tutorials, ‘efficient’ teaching materials, and ‘runnable’ example simulations only for that version of ns-3. People who have vast knowledge of such LLMs-based AI systems can try to implement one such task-specific AI model for ns-3. It may happen in our near future.

So, I believe that this new AI could not replace ns-3 developers and experts in innovative, creative tasks, at least for the time being.

Until now, Still  I am feeling alive and thinking😊.

And I still need ns-3 experts of this forum to provide answers from their unique minds.

References

  1. Can ChatGPT replace programmers? Exploring the Possibilities
  2. Will ChatGPT supplant us as writers, thinkers?
  3. https://chat.openai.com/
  4. https://bard.google.com/
  5. What Makes ns-3 a Complex Thing to Understand and Use? 

 

WhatsApp Discuss Through WhatsApp