alltom / earshot

I'll shoot you right in the ear!
3 stars 0 forks source link

improve agent algorithms to reduce collisions #16

Closed masonicboom closed 14 years ago

masonicboom commented 14 years ago

is it physically possible to detect radio collisions? if so, make agents abort transmission as soon as a collision occurs. that should be a good first step

masonicboom commented 14 years ago

yes! collision detection is possible: http://www.cs.virginia.edu/~whitehouse/research/collisionDetection/

we could do something like mandate that every N-th bit of a transmission is a 0, and then recognize collisions by that condition failing. the paper linked off that whitehouse site might have something more fancy--i didn't finish reading it

masonicboom commented 14 years ago

wait... the question is whether an agent that's transmitting can detect that someone else is transmitting simultaneously. hmm. i guess if we just split (large enough) transmissions into packets, and then do a little pause between packets to listen for other activity, that would work

masonicboom commented 14 years ago

ok. i think we can just avoid the problem by mandating that no agent starts a transmission when its receiving another one. collisions can still occur in this situation: <= A => B <= C => A is in range of B which is also in range of C, but A and C aren't in range of each other. Collision occurs at B, but A and C are unaware.

We'll probably have to deal with that situation elsewhere in our protocol, but for now i think we can ignore it

masonicboom commented 14 years ago

2bf8a45d1225345b84f43db5989f6fc0e19b3715 fixed this one. it's not in master yet because that branch has some feature regressions