IEEEE CCECE 2014 and Cognitive Agent Simulation

This past week I attended IEEE Canadian Conference on Electrical and Computer Engineering (CCECE2014) in Toronto, Canada. I was there because of two papers I was a co-author on. The work was part of a side project I was involved in on cognitive agent simulation. The idea was inspired by the observation that in the spring time, many newborn animals are struck as they cross the street. Later in the year, it seems that fewer animals meet this fate. So have the animals which survived observed the doomed creates being struck, learned something about the environment, and managed to become more intelligent? We aimed to model this type of environment, and then re-create the most basic intelligence to try to replicate this behaviour with a cognitive agent.

I was responsible for implementing the simulation tool and the naiive learning algorithm which we also presented at the conference. The simulator was created in c/c++ and was designed in such a way that later on the intelligence algorithms could be swapped out, so that we could also experiment with more sophisticated learning algorithms.


Notes on NS3 – IEEE 802.11 Wi-Fi Association

For some of my research I have been delving into the details on how exactly station devices in an IEEE 802.11 network associate with an access point. As far as I understand from the standard station nodes have two possibilities.

1. Active
In this case the station nodes send out probe requests to see if any access points respond during a timeout period

2. Passive
In this case the station nodes just sit and listen over a timeout period to see if any aps send out beacons.

In either case, according to the standard, the station node is supposed to rank the APs according to received signal strength (RSS). While this is recognized as a bad method for various reasons – it is a simple and quick way to select an AP.

In NS3 (3.16), as far as I can tell, there is no measure of RSS. The station node simply associates with the first AP that it receives either a probe response or beacon from (depending on active or passive). Usually this ends up being the closest AP to the user station because it has the lowest propagation delay due to the lower distance. However, depending on when the stations start up, a farther station is sometimes selected – at least initially until enough beacons are missed that an AP disassociation occurs, and the process starts over with the closer AP being selected.

In NS 3.16, the code which controls AP association is located in src/wifi/model/

Looking at the code details, and confirming with some extra logging I added – a Wi-Fi station when starting, broadcasts a probe request (in active probing mode). It then waits for a probe response.

If you look in the “StaWifiMac::Receive (Ptr packet, const WifiMacHeader *hdr)” function, you can see that immediately when it receives one of these responses, it sends an association request to the AP. This is one place where changes must occur if one wishes to make a smarter decision for selecting an AP. In my case, instead of immediately sending an association request, I record the probe response and continue to wait for more until the probe timeout occurs.

If you look at “StaWifiMac::ProbeRequestTimeout (void)” you can see this is where you can now implement the association decision. After the timeout has occured, we now have a list of all of the received probe packets and can make the decision and associate like before.

Tutorial: Install ns-3 in Windows 7 using cygwin

Ns-3 is one of the most popular simulation tools for network simulation. See the website: It is the successor to the popular ns-2 simulator. The tool is written in c++ / python, but I manage to get by using mostly only c++ (as opposed to ns-2 which uses c/c++ and tcl). One major difference between ns-3 and ns-2 is that this version has been designed for wireless network simulation from the ground up. (There is support for many types of 802.11 networks including 802.11s mesh networks which interest me).


Update on the Lack of Updates & PhD Acceptance

Just a quick post to let any readers know why there has been a lack of posts on the blog lately. I have been working like crazy on my thesis with the hope of completing it in the next month or so. I have also been preparing for the AINA 2009 conference I will be presenting at Bradford University in England. Also I have been working on a paper for a conference in Toronto (TIC-STH 2009 I think) with a deadline of May 1st May 31st (extended). So there’s been alot going on and not much time.