This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Andrew2060's profile picture

[ICBM] [WIP] Skynet Missile Defence Network

Started by Andrew2060, 14 October 2015 - 05:35 AM
Andrew2060 #1
Posted 14 October 2015 - 07:35 AM
===============================================================================
[indent=7][OverView][/indent]

I designed two programs with the help of FlagHacker, which are able to control a nuclear arsenal.
The program requires the following mods to function, OpenCCSensors, ICBM, ComputerCraft.

The ICBM mod is fun to use but takes up a lot of space and at times can require hardcore wiring.
Now i was based in a submerged Nuclear Submarine, with sixteen functional missile silos.
Wiring was hard because i had pipes, cables and what not already taking up so much space.
So i said "Hey!, what if i use ComputerCraft to make a launch controlling system".
===============================================================================
[indent=7] [Guide][/indent]

Red = Slave, Green = Master.

0. Below are the links for two different programs following the principle of Master and slave.
Where a Master can have an unlimited amount of slaves, but each slave only has one master.
To use the system, one must have a ICBM setup already prepared for launch and 2 Advanced PC's.

1. Place a computer in the command room of your silo, this will be the Master/launch control PC.
2. Place another computer in front of every ICBM control panel that you have prepared before.
3. Place wireless modems on top of every computer that you have placed (silo and master).
4. Use PasteBin to get the main launch program into your master/main PC and name it as startup.
5. Edit the startup file that was just downloaded and if you want change the password "949-854-3444".
6. The password changing step isn't necessary but can be changed if you want your own password.
7. Save the startup file and then proceed to running it by either rebooting or contol R.
8. Use PasteBin to get the Silo launch program, download it as startup within the silo PC's.
9. Run the startup file on each of the Silos that you already have setup from Step 0.
10. Voila, the setup is done and all you have to do is place some missiles and fire em.

*Sorry i'm not the best at giving instructions but that's the best i could do in ten minutes*

===============================================================================
[indent=7] [Programs] [/indent]
Master:
http://pastebin.com/HgurSf2F

Slave(Silo):
http://pastebin.com/exm7HRhr

===============================================================================


Enjoy!!!! :)/>/>/>/>
Edited on 23 October 2015 - 07:06 PM
Creator #2
Posted 14 October 2015 - 10:40 AM
This program allows you to launch rockets from a distance?
クデル #3
Posted 14 October 2015 - 10:49 AM
There's been a few of "AI" related programs lately… something strange is going on.
Creator #4
Posted 14 October 2015 - 11:53 AM
Damnit, he discovered the secret operation. Although I have to admit, this Skynet is not very AI.
クデル #5
Posted 14 October 2015 - 02:04 PM
Unfortunately so, or perhaps the AI is behind the scenes…
Creator #6
Posted 14 October 2015 - 02:06 PM
I looked through the codes. It does not download anything nor does it generate code.
Lyqyd #7
Posted 14 October 2015 - 03:24 PM
Moved to Programs.
Andrew2060 #8
Posted 15 October 2015 - 10:47 AM
Sorry guys I'm on vacation and I only have my iPad so excuse my grammar and or spelling

There are two variants to my system, one is the offensive system and the other is the defensive system.
I only released my offensive system program due to the fact that the other is still a bit buggy.

Keep in mind when I say silos I mean an actual missile silo with a computer and modem.

The offensive system basically is a launch PC using red net to wirelessly control a infinite amount of silo computers.
It has no ability to learn but makes life easier because you can select how many waves to fire and coordinates remotely.
So it removes the need to go to a bunch of silos and manually change their coordinates every time you want to launch.

The defensive system works in a different way but has somewhat the same ICBM setup as the offensive system.
It uses radar data to name incoming entities such as missiles as well as provide their heading and coordinates.
I'm still working on the heading part but I've managed to get it to extract and export coordinates wirelessly.

Now the defensive system is basically a main computer with a modem attached to a radar.
This basically gains radar data and wirelessly sends it to nearby Anti ballistic missile (ABM) silos.
When a entity comes too close to the fail safe radius, the radar outputs a red stone signal.
When the red stone signal is received by the computer, it tells the silos to fire at the last provided coordinates.
This is great because a radar has a max range of 500 blocks hence the following;

Current Features for Defense System:
Max intercept count: depends on your setup but with mine an average of 62 missiles.
Launch delay: one second after the previous launch of a nearby silo.
Max ABM missile count: Unknown, but possibly unlimited?
–can name any ICBM
–can target any ICBM
–No manual input.

Planned features:
Counter measures, computes the heading of a missile, reverses it and uses information to lob a nuke at attacker.
Database of possible enemy silos for target pre selection based on previous intercepted ICBMS.
possibly decrease launch delay so that it's a third quicker. (Time is everything in nuclear war).

——-
I want to make the defense system something that learns on its own,
Which is why Im working on it so that it creates a database of the possible origins of incoming missiles.
This is hard because a missile doesn't carry fuel so you can't use any equations to find the origin.
The heading system can provide enough data for a possible strike but not guaranteed results.

I may later link both systems so that they communicate with each other,
One shoots down missiles and five minutes after last detection it sends information to the silos, for a retaliation.
Then could use radar data to detect when our friendly missile was shot down, use that to narrow down possibilities.


I'm not near a computer all I have is my iPad because I left for Dubai yesterday.
Will be back onn satruday to test whatever I manage to code now.


So that's the general idea, thanks for reading.
Andrew2060 #9
Posted 15 October 2015 - 10:59 AM
In case you were wondering, I changed my IGN from burnin_aura to Andrew2060 recently.
I don't want to advertise the mine craft community I play on so I won't say anything about that.

This wasn't stolen or copied off someone else. It was made by myself FlagHacker and Slit.
I sign my work using my new community IGN (Andrew2060) because I give out programs I make there.

This was the basic program I made a long time ago, it'll be based of the same idea but more advanced.

http://pastebin.com/H4kALgKf

It lacks the coordinate detection and selection.
Edited on 15 October 2015 - 09:03 AM
クデル #10
Posted 15 October 2015 - 11:11 AM
I looked through the codes. It does not download anything nor does it generate code.

I was joking.
Creator #11
Posted 15 October 2015 - 12:10 PM
You serious? :P/>
Andrew2060 #12
Posted 15 October 2015 - 12:33 PM
You serious? :P/>/>

What?
Andrew2060 #13
Posted 15 October 2015 - 12:50 PM
I mean the defensive system is arguably an AI.

It interprets data and requires no input.

All I have to do is just code it, and that's impossible without being able to test each version.
Plus I suck at databases as well as math so once I know the equations I need, I'll work on it
Andrew2060 #14
Posted 16 October 2015 - 09:19 PM
Anybody got suggestions ?
Creator #15
Posted 16 October 2015 - 09:54 PM
A defense system is extremely complicated to make.

What I'd do would be, I detect the position of a missile, wait 0.5 secs detect it again, and then again. That way you can calculate the trajectory and determine where they come from. This way you can nuke the launching base. At the same time, send a missile to intercept the one coming towards you.
Andrew2060 #16
Posted 16 October 2015 - 10:38 PM
A defense system is extremely complicated to make.

What I'd do would be, I detect the position of a missile, wait 0.5 secs detect it again, and then again. That way you can calculate the trajectory and determine where they come from. This way you can nuke the launching base. At the same time, send a missile to intercept the one coming towards you.

That was my general idea as I said in a previous post :P/>

It's not as complicated as it seems, I did it using redstone repeaters before.
The problem is radars have a max range of 500 blocks, I doubt people will build within that range.
Heading can be calculated as can trajectory/velocity. Distance from origin however cannot.

Pretty much why I'm waiting for you to make your AI obsolete, then I'll learn and apply it to my own system.
Well that is if you allow me to use your code and/or ideas to implement into my own.
Creator #17
Posted 16 October 2015 - 10:46 PM
Yep, feel free to use the code.

Don't forget to give credit to these 5 hours of my life I lost while coding AI.
Andrew2060 #18
Posted 17 October 2015 - 09:48 AM
I'm confused about how to go about this.

Should I just make the master computer have the ability to contact both icbm and abms silos?

Current idea:
Master with radar —> ICBM/ABM Controll PC's —> ICBM/ABM Silos

Possible idea:
Master with radar —> ICBM/ABM silos

Not sure which way to go about this.
I'd have to use parallel either way.

I really hate parallel.
Edited on 17 October 2015 - 07:49 AM
Creator #19
Posted 17 October 2015 - 10:19 AM
Why do you hate parralel
Andrew2060 #20
Posted 29 November 2015 - 11:30 AM
Gah, well i got pretty far in this nonsense.

All i need is a client version to interpret this.
http://pastebin.com/vK6jGNge
Andrew2060 #21
Posted 23 June 2016 - 04:49 PM
So after taking a few months off and coming back to it,

I did a redesign of my code and with the help of some others found a leaner and meaner way to go about it.
This works by simply tasking multiple silos to fire and reload, then repeat the process till all threats are destroyed.
Im also working on the AI part now, calculating distances, trajectories, velocities all the good physics stuff i learned.

Anyhow here is the code:

Server:


--[[Skynet Nuclear ABM Defense Program by Andrew2060]]--
--[ABM Server, use with http://pastebin.com/aNsduCem]]--
--[System requires atleast 5 CC's with Modems and ABMs]]--
--[System has 5% chance of failure in killing missiles]]--

--[[Settings]]--
local waitDelay = 2
local countersPerMissile = 1
local missileDelay = 3

--[[Initialization]]--
local silos, curSilo = {}, 1
peripheral.find("modem", rednet.open)
term.setBackgroundColor(colors.blue)

local function red()
term.setBackgroundColor(colors.red)
print("												   ")
term.setBackgroundColor(colors.blue)
end

rednet.broadcast("ABM1")

repeat
    local id, msg = rednet.receive(waitDelay)
    if msg == "ABM" then table.insert(silos, id) end
until not id

--[[Main Programs]]--
while true do
    if not redstone.getInput("back") then
	    term.clear()
	    term.setCursorPos(1, 1)

	    red()
	    print("	    SKYNET DEFENSE SYSTEMS ACTIVATED		   ")
	    red()
	    print("	  ANTI-BALLISTIC MISSILE SHIELD ONLINE		 ")
	    red()
	    red()
	    print("			   [STANDBY ABM Silos]				 ")

	    for k, v in ipairs(silos) do print("  silo #" .. k .. " id = "..v) end
	    red()
	  
	    repeat os.pullEvent("redstone") until redstone.getInput("back")
    end
  
    term.clear()
    term.setCursorPos(1, 1)
    term.setTextColor(colors.red)
  
    print("Incoming Missiles:")
    print("Firing CounterMeasures\n")
  
maptab = peripheral.call("back","getEntities")
maptxt = textutils.serialize(maptab)
if maptxt ~= "{}" then
allDat = 0
for num in pairs(maptab) do
allDat = allDat+1
end
targets = allDat/3
for i=0,targets-1 do
	    local msg = {["x"] = math.floor(maptab["x_"..i]), ["y"] = math.floor(maptab["y_"..i]), ["z"] = math.floor(maptab["z_"..i])}

	    print("Incoming Missile Threat #" .. i .. " at X:" .. msg.x .. " Y:" .. msg.y .. " Z:" .. msg.z)
	    print("Launching " .. countersPerMissile .. " ABM Missile CounterMeasures...\n")

	    for i = 1, countersPerMissile do
		    rednet.send(silos[curSilo], msg)
		    curSilo = (curSilo == #silos) and 1 or (curSilo + 1)
		    sleep(missileDelay)
		    end
	    sleep(0)
	    end
	 sleep(0)
    end
   sleep(2)
end
sleep(1)
Edited on 23 June 2016 - 02:49 PM
FoxData #22
Posted 30 July 2016 - 06:29 PM
Its cool but no secure enough. No two-man rule, No launch-codes, And its wireless. But its still pretty cool,

Suggestions:

Add Two-man rule
Add a launch code