Sunday 7 September 2014

It's STILL alive!

It's been exactly a month since my last update, my excuse is a lot of work commitments and The Crunch have really sapped my time. But 2 more weeks of The Crunch and I should have more time to spend on HTP.

Having said that, I have managed to squeeze in the odd hour or two here and there and I've actually made some good progress on something I'd like to share with the tumbleweeds :]

I've completely rewritten how the signal routing system works and have finally got it up and running. Nodes can now now 'provide' or 'request' things based on their functions, for example, here is part of the definition of a computer's power supply:

"Functions":
[
  {
    "Type": "Request",
    "ResourceType": "MediumVoltagePower",
    "Interval": 5,
    "ShowRequest": true,
    "Critical": true
  },
  {
    "Type": "Provide",
    "ResourceType": "LowVoltagePower",
    "Channel": "Power",
    "MaxPerSecond": 100
  }
]

What this means is every 5 seconds a power supply will attempt to request a unit of 'MediumVoltagePower'. Initially a power supply has no idea where it can get this request fulfilled, so it sends a broadcast request to every other node it's connected to. Put simply, this broadcast request will spread out across the entire power network until it encounters a node which has a 'provide' function that can fulfill the request. When this happens, the providing node sends a signal back down the reverse route that the requesting signal took. When the requesting node receives this signal, it now knows of a node that can provide for future requests so it stores the route to that node for future use.

I do a few other things to help speed this broadcasting process up, like if a request signal passes through a node that can't provide for the request, but does know of a node that can, it will point the request in the right direction, speeding the process up. Also, if any node is asked to pass on a providing signal, it will know where that signal came from, so it knows if it, or any other requesting node, needs that particular resource, it knows where to find it.



Well that's the dry details of how the system works out of the way. What's quite interesting about this system is pretty much all the traffic on the internet can be boiled down to requests and provisions. Some of them are critical for a node's operation, like power. But some are simply the byproducts of the behaviors of the AI agents in charge of the nodes. Take the following example for taken from the definition of the 'AveragePersonComputer' role (roles are something I use to describe the behaviors of a node):

"Functions":
[
  {
    "Type": "Request",
    "ResourceType": "Network",
    "Channel": "SocialNetworking",
    "TimesPerDay": 20,
    "ShowRequest": true,
    "Critical": false
  },
  {
    "Type": "Request",
    "ResourceType": "Network",
    "Channel": "Banking",
    "TimesPerDay": 2,
    "ShowRequest": true,
    "Critical": false
  },
  {
    "Type": "Request",
    "ResourceType": "Network",
    "Channel": "Porn",
    "TimesPerDay": 1,
    "ShowRequest": true,
    "Critical": false
  },
  {
    "Type": "Request",
    "ResourceType": "Network",
    "Channel": "Piracy",
    "TimesPerDay": 1,
    "ShowRequest": true,
    "Critical": false
  }
]

None of these requests are vital for the operation of the computer, but they will be requested by the node as long as it's active. These behaviors might change over time too, if a computer is infected by malware and becomes part of a botnet, it may start producing spam traffic as well as it's normal traffic.

This is all kind of exciting for me, cause the signal routing system is one of the first big systems I need to start doing some interesting stuff, stuff even bordering on gameplay! :O It's also really exciting to see the world come to life for the first time:



Having spent a good chunk of my day today trying to tear out quite an impressive infestation of spyware, browser bars, search hijackers and all kinds of other nasty computer bed bugs from my girlfriend's laptop, I can't wait to start simulating that kind of stuff in my little internet :]

Hack the Planet!

No comments:

Post a Comment