Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - PurpleYouko

Pages: 1 2 3 [4] 5 6 ... 11
46
Solved Bugs / Aim getting WAAAAAY too big
« on: October 27, 2005, 03:12:25 PM »
I found a new one.

A really frickin stupid one too.

It should never exist. Whoever programmed this bit of code should change his name to Richard Head.

It was quite possibly me that did it  :redface:

Here is the code

Code: [Select]
 If Abs(.mem(aimsx) > 1256) Then .mem(aimsx) = 1256 * Sgn(.mem(aimsx)) 'new crash fix?
    If Abs(.mem(aimdx) > 1256) Then .mem(aimdx) = 1256 * Sgn(.mem(aimdx))
    If .mem(setaim) <> 32000 Then
      While .mem(setaim) > 1256
        .mem(setaim) = .mem(setaim) - 1256
      Wend
      While .mem(setaim) < 0
        .mem(setaim) = .mem(setaim) + 1256
      Wend
      .aim = .mem(setaim) / 200
      .mem(setaim) = 32000
    End If
    .aim = .aim + (.mem(aimsx) - .mem(aimdx)) / 200
    If .aim > 2 * pi Then .aim = .aim - 2 * pi
    If .aim < 0 Then .aim = 2 * pi + .aim
    .aimx = Cos(.aim)
    .aimy = Sin(.aim)
You can find it in Updvars2 in the robots module.

The error occurs on line
Code: [Select]
.aim = .aim + (.mem(aimsx) - .mem(aimdx)) / 200
Holding the mouse over ".mem(aimsx)" gives -32000
Holding the mouse over ".mem(aimdx)" gives 1256
This is obviously going to push .aim beyond the 32768 limit and give us an overflow.

I thought I had fixed this ages ago by limiting .aim to a magnitude of 1256. The code to do it is right up there in this chunk of code.

See if you can spot the stupid ass mistake in it.

47
Solved Bugs / Chart color issue
« on: October 27, 2005, 02:55:21 PM »
Bots reports
Quote
Another thing is, for some reason the charts colors being used does not match the robots colors. (I know I am the one unoffisialy incharge of the charts, or so) I might fix it some day.

This is a valid bug and needs to be looked into.

48
Solved Bugs / Color issues
« on: October 27, 2005, 02:50:32 PM »
Bots reported.
Quote
Generaly , the (user side) colors need some work, I must agree.

I assume you are talking about user color selection for species.

If so please elaborate. I can find no fault here.

49
Suggestions / Background pictures.
« on: October 27, 2005, 02:48:16 PM »
Bots reported.
Quote
how about making the "background picture" system defult and save with settings, I am tired of seeing the same annoying darkblue for all my sims I set up from scratch, and I am equaly tierd of reselecting a spesific background for a spesific settings file, simulation file.

When you choose a background picture make it like a messagebox asking if you want it to be the programs defult , then save it into the settings structure (the path I mean)

Great suggestion. I like it a lot.

However it ISN'T a bug. It is a suggested improvement.

50
Bot Tavern / EEEEPP! My alga has mutated
« on: October 27, 2005, 02:17:22 PM »


They all turned grey too.

Here's the DNA code

'#name: Alga_Minimalis.txt
'#generation: 736
'#mutations: 8

cond
  *.trefaimsx
  *807
  !%=
start
  50
  .repro
  store
  50
  add
  .aimdx
  store
stop

cond
start
  50
  .repro
  store
  49
  add
  5
  rnd
  store
stop
end

'#hash: rhv[vG1.x1zH@IGIta_h

51
Solved Bugs / The NextElement bug
« on: October 27, 2005, 10:58:16 AM »
Quote
I still don't know where to go to make that change you suggested!!!!

It's in the place where the original error occured.

The nextElement function in the Mutations module.

here it is again.

Code: [Select]
Public Function NextElement(ByRef DNA() As block, beginning As Integer, tipo As Integer, value As Integer) As Integer
  'takes the input for the first value in a gene and returns the position of the next statement
  'as defined by tipo and value
  Dim k As Integer
  Dim uboundarray As Long
  
  uboundarray = UBound(DNA())
  If DNA(uboundarray).tipo <> 4 And DNA(uboundarray).value <> 4 Then
    ReDim Preserve DNA(uboundarray + 1)
    DNA(uboundarray + 1).tipo = 4
    DNA(uboundarray + 1).value = 4
  End If
  k = beginning
  
  If beginning > 0 And beginning < uboundarray Then  'change this line.
    While Not (DNA(k).tipo = 4 And DNA(k).value = 4) And Not (DNA(k).tipo = tipo And DNA(k).value = value)
      k = k + 1
    Wend
    If Not (DNA(k).tipo = tipo And DNA(k).value = value) Then k = -1
  Else 'beginning wasn't valid
    k = -1
  End If
  
  NextElement = k
End Function

Change the line labeled with 'change this line.

from

Code: [Select]
If beginning > 0 Then  'change this line.
to

Code: [Select]
If beginning > 0 And beginning < uboundarray Then  'change this line.
It will fix the overflow problem caused when a robot has zero DNA length

52
Off Topic / Bateman Equation
« on: October 25, 2005, 12:17:03 PM »
If any of you people who haven't yet chosen a career path want a bit of advice.....

For pity's sake don't become a nuclear physicist!!!!

And if you do then keep your thrice damned equations far far far away from me.

To give you an idea what you will be letting yourself in for check out the Bateman Equation which I am currently tryin to build into a program.

UUGGHHH! My brain hurts.  :wacko:

53
Bugs and fixes / Let's make a stable platform
« on: October 25, 2005, 09:56:22 AM »
OK Guys. I think it will probably be best to go with the slightly newer 2.37.4 as a start point.

You can download the source from Here if you don't already have it.

Just run it directly through the VB interpretter and make it crash.

Either try to figure out how to fix the error yourself or report it to me with as much detail as you can manage.

I will colate all changes and fixes then periodically release a fixed version.

There will be no additional stuff added until we have a 100% stable platform

Good luck peeps  :D

54
Bot Tavern / Black ant moved.
« on: October 20, 2005, 09:29:29 AM »
Hi Eight. Where have you been all this time?

I have moved your black ant from the starting gate into the "Interesting behaviour" section of the beastiary

Has it been changed from your original black ant? Or is the the same bot?

55
Off Topic / Off-Topics links forum added
« on: October 19, 2005, 01:30:05 PM »
I have added a new Non-DarwinBots links section to the forum.

I have included a few links that are related to some of my other personal projects. Also a couple of programming and Excel sites.

let me know if you have any more links that you think would be useful to add.  B)

56
Off Topic / Happy birthday Stryke
« on: October 18, 2005, 09:10:16 AM »
We have another birthday today.

Stryke is 17.

The question is, ARE YOU STILL HERE STRYKE???? I haven't seen you about for ages.

Well anyway, Happy Birthday!!!

 :Birthday:  :party:  :cheers:

57
Off Topic / Serious weirdness going on here.
« on: October 17, 2005, 04:39:48 PM »
I have just come across the weirdest thing in some VB code that I am writing.

It should be quite straightforward. I have a textbox in which the user can type anything he wants then using a keypress event I transfer the current value of the textbox to another place after the user presses the enter key.

Seem normal enough? I thought so.

Here is the routine. (note the "a = a" lines are for highlighting as breakpoints and serve no actual function

Code: [Select]
Private Sub DataEntry_KeyPress(KeyAscii As Integer)
  If KeyAscii <> 13 Then Exit Sub
  If DataEntry.Text = "" Then
    DataEntry.Text = "0"
    a = a
  End If
  a = a
  DispGrid DataEntry.Text
  DataEntry.Visible = False
  DataEntry.Text = ""
End Sub

As you can see if the keypress returns anything other than 13 (enter) then the code just leaves the subroutine but when enter is pressed, the current value in the text box is sent to the "DispGrid" routine for output into a flexgrid object.

So what do you think will happen when I run the program?

What actually happens is that no matter what value is in the text box, "0" gets sent to "DispGrid". Weird huh?

It gets worse.

If I set the "a = a" statement inside the "If" statement as a breakpoint then run the program, it catches it and shows a value of "0" in the textbox as there should be if there was no text in it at all.

However (and this is where it gets bizarre) If I set the second "a = a" as the breakpoint and run the program, it skips the first breakpoint completely and the value in the textbox is shown to be whatever it was that I typed in. On continuing, the correct value is sent to "DispGrid" and the program works perfectly as designed.

This is the first, only and I hope last time that I have ever seen the outcome of a program change due to nothing more that highlighting a breakpoint in the code.

This is not supposed to happen  :blink:

58
RANT / STUPID ASSED FAX MACHINE!!!
« on: October 14, 2005, 01:52:01 PM »
Damn stupid crappy bloody F*%$@#g FAX Machine

I hate faxes

I just spent the best part of this week writing a research paper. It's deadline is today and my stupid assed FAX machine has gone tits up

:shoot: :fax:  :plzdie:

59
Off Topic / Happy Birthday Syndlig (wherever he is)
« on: October 11, 2005, 03:09:21 PM »
I haven't seen Syndlig around for ages but just in case he is still with us.

Happy B'day dude!  :Birthday:  :party:

60
Announcements / New sister site for MMORPGs
« on: October 05, 2005, 02:34:48 PM »
I have set up a new forum with the specific aim of discussing, and maybe making, MMORPGs (Massive Multi-player On-line Role Playing Games)

Come on over to MMORPG Resources if you are interested.   :sly:

Pages: 1 2 3 [4] 5 6 ... 11