Author Topic: Core Wars  (Read 24063 times)

0 Members and 1 Guest are viewing this topic.

Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: Core Wars
« Reply #60 on: March 29, 2012, 04:21:14 pm »
Maybe a way in the debugger to scroll through the core?

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Core Wars
« Reply #61 on: March 29, 2012, 04:22:48 pm »
Yeah thats what mrmprog suggested

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: Core Wars
« Reply #62 on: March 29, 2012, 09:37:45 pm »
Is it possible to make a system that defends against imps? I am working on a warrior that would be really cool, but it must be able to always stop imps. I would have posted in the warriors thread, but I was the last to post there :P
« Last Edit: March 29, 2012, 09:37:50 pm by mrmprog »

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Core Wars
« Reply #63 on: March 29, 2012, 11:33:03 pm »
The best way to defend against imps is to continuously decrement the B field of the memory location 2 instructions above your program.  If an imp hits that, it will fail to copy its statement to the next instruction and then die.
« Last Edit: March 30, 2012, 12:05:33 am by leafy »

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: Core Wars
« Reply #64 on: March 30, 2012, 11:30:45 am »
So, how exactly would I decrement the B field? Sorry, Im pretty bad with redcode so far.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Core Wars
« Reply #65 on: March 30, 2012, 01:10:53 pm »
If you wanted a program that did nothing but kill an Imp, you would write something like this:

JMP 0 )-2

The JMP command always jumps to the location specified by the first argument (0) so this instruction will keep being executed over and over again.  The second argument isn't used for the JMP command, but we can still use it.  The ) addressing mode decrements the B field of whatever it points to, so )-2 decrements the B field of the instruction 2 behind the current one.

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: Core Wars
« Reply #66 on: March 30, 2012, 07:18:12 pm »
Thanks! Using that, I made a nifty warrior that bombs with MOV 0 1s, and then turns into just an imp gate when it is done bombing. It seems to be surprisingly effective (or maybe my test subjects are just really bad). Do you plan make some sort of development environment, maybe as a exasperated program? Also, I noticed that occasionally, it will "skip" through rounds, as if the enemy warrior is killed instantly. It is difficult to replicate this though.
« Last Edit: March 30, 2012, 07:18:50 pm by mrmprog »

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Core Wars
« Reply #67 on: March 30, 2012, 07:26:26 pm »
What kind of developemtn environment do you mean?  And I'm not sure if exasperated is the word you are thinking of :P

And yeah I have had that bug happen to me as well, I am working on trying to figure out why it happens

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: Core Wars
« Reply #68 on: March 31, 2012, 12:15:35 am »
Auto correct fail... x.x I meant external. By a development environment, I mean something that will allow us to not have to type out the commands, like a redcode editor. I was just thinking it could make creation of programs easier.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Core Wars
« Reply #69 on: March 31, 2012, 12:57:44 am »
How else would you enter the commands? 

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: Core Wars
« Reply #70 on: March 31, 2012, 11:20:23 am »
I mean a separate program, in which you can navigate a menu to select the commands you want, instead of typing them. The program would then save the warrior as a program.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Core Wars
« Reply #71 on: March 31, 2012, 01:17:59 pm »
I personally would think that having to select a token from a menu of 20 would be a lot more annoying than just simply typing it out yourself.  Either way, there probably won't be a special editor for core wars, as I was never even able to get my Basic editor to work properly D:

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: Core Wars
« Reply #72 on: April 01, 2012, 02:01:09 pm »
Hmm, you are probably right. The more I type the commands, the faster I get :) Will it be possible in future updates to do this?
Code: [Select]
Jmp I+2
I think it would make writing some things a little easier, unless it requires major changes on your part.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Core Wars
« Reply #73 on: April 01, 2012, 02:50:13 pm »
It could probably be done, but maybe instead the syntax would be 2+I, as that would make it a bit easier to parse