Author Topic: Robot turning its back when trying to attack opponent (Stock AIing  (Read 1626 times)

Offline aztwecas

  • Antweight
  • Posts: 4
  • Rep: 0
    • View Profile
    • Awards
I'm new to aiing and am having a fair bit of trouble with one of my robots. The issue is that the robot starts the battle fine but when approaching the other AI robot it turns and uses its back as a ram instead of it's front spinning blade. I've had success in aiing a couple of other robots but this is the first time something like this has happened.

The Bindings line is this ("Morning Star", "DirectionalSpinner", { 'invertible':True,'nose':math.pi,'radius':0.2,'range':500,'topspeed':100,'throttle':110,'turn':60,'turnspeed':2.5,'weapons':(5,6,7,8)}))

note: i have tried editing the line but with little success, since i am new to most of this the line is a recycled one from DLC and has been slightly edited through trial and error.

Offline I Like Tacos

  • Lightweight
  • Posts: 177
  • Rep: 4
    • View Profile
    • Awards
Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #1 on: January 17, 2015, 06:23:07 PM »
Did you change the direction the bot faces forward in the bot lab? If you didn't, try taking out

'nose':math.pi,

Offline aztwecas

  • Antweight
  • Posts: 4
  • Rep: 0
    • View Profile
    • Awards
Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #2 on: January 18, 2015, 07:47:56 AM »
Yeah I've tried editing the forward heading and removing that line of code but it has no effect. The problem isn't to do with the way the robot starts but with one of its movements in battle

Offline Avalanche

  • Retired.
  • Ultra Heavyweight
  • Posts: 3108
  • Rep: -34
  • Yeah, I don't know why I'm still here either.
    • View Profile
    • Awards
  • Discord: ThePootisPower#8377
Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #3 on: January 18, 2015, 10:16:54 AM »
It maybe the line of code saying weapons has incorrect values and it is using something in the back as the weapon. Download notepad ++ and see what the values in weapons are corresponding with your bot.
Former DSL HW champion.
Runner-Up in The Cybernetic Colosseum HW division.
Semi-finalist in RNP: Sword of Glory.
Robogames 1 BW Runner-up.
Professional cunt.
Man of a thousand alt accounts.

Offline Lemonism

  • *
  • Posts: 666
  • Rep: 16
    • View Profile
    • Awards
Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #4 on: January 18, 2015, 01:17:41 PM »
It maybe the line of code saying weapons has incorrect values and it is using something in the back as the weapon. Download notepad ++ and see what the values in weapons are corresponding with your bot.
You need the Bot File Exporter if you want to know what components the weapons numbers correspond to, but Notepad++ is a good idea anyway.
Download Mortis.py
Download some of my DSL2.2 Bots

Offline Resetti's Replicas

  • *
  • Posts: 4399
  • Rep: 18
  • Replica King
    • ResettisReplicas
  • Awards BOTM Winner
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #5 on: January 18, 2015, 01:51:12 PM »
Check your controller programming screen - are you absolutely sure that the forward and reverse controls work as they should, and are labelled properly?  Humor me and try it right now, even if they did work previously.

Offline aztwecas

  • Antweight
  • Posts: 4
  • Rep: 0
    • View Profile
    • Awards
Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #6 on: January 18, 2015, 04:36:09 PM »
Cheers guys, i'll download notepad++ to see if there's an error with the weapon. Sonny I've just re-wired the bot in all possible configurations for forward and back there doesn't really seem to be a problem there.

Offline cephalopod

Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #7 on: January 18, 2015, 05:54:46 PM »
Just out of curiosity, what happens if you use spinner or omni.py?
bristol bot builders / two headed death flamingo / snappy robots
//
kindest and friendliest '13, '15, '16, '17 / favourite staff member '14, '15

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #8 on: January 19, 2015, 05:54:02 AM »
It maybe the line of code saying weapons has incorrect values and it is using something in the back as the weapon. Download notepad ++ and see what the values in weapons are corresponding with your bot.
The position of the weapons listed doesn't impact the movement of the bot. The list of weapon IDs is used for switching tactics after running out of weapons. Sadly, we don't use them for much else and many AI.py files have broken implementations (meaning the bot doesn't switch tactics even though there is code for it to do so).

As Lemonism pointed out, Apanx's Bot Exporter is handy for checking component IDs but you could do it manually by counting from top to bottom the components (the IDs go in order). The component ID of the chassis is 0.

It sounds like your LeftRight control is wired backwards.

Offline Naryar

  • Posts: 23278
  • Rep: 20
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #9 on: January 19, 2015, 05:59:00 AM »
Check your wirings, yeah. And your forward heading.

Offline Avalanche

  • Retired.
  • Ultra Heavyweight
  • Posts: 3108
  • Rep: -34
  • Yeah, I don't know why I'm still here either.
    • View Profile
    • Awards
  • Discord: ThePootisPower#8377
Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #10 on: January 19, 2015, 07:00:16 AM »
My best guess is your nose pi is wrong. there is many variations on it, try a bunch of them. If you send us the bot, maybe we could help you more?
Former DSL HW champion.
Runner-Up in The Cybernetic Colosseum HW division.
Semi-finalist in RNP: Sword of Glory.
Robogames 1 BW Runner-up.
Professional cunt.
Man of a thousand alt accounts.

Offline Naryar

  • Posts: 23278
  • Rep: 20
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #11 on: January 19, 2015, 07:13:46 AM »
The bot wouldn't turn and attack the other bot with it's back if it was a matter of nose.pi.

Offline cephalopod

Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #12 on: January 19, 2015, 09:26:59 AM »
Plus that was previously mentioned and was not the cause.

With your LeftRight control, did you mess it up to start with and have the A/LeftArrow/whatever wired to the right control (and D/RightArrow to the left)?
bristol bot builders / two headed death flamingo / snappy robots
//
kindest and friendliest '13, '15, '16, '17 / favourite staff member '14, '15

Offline toAst

  • *
  • Posts: 928
  • Rep: 5
  • this one goes out to all of my babies mamas
    • View Profile
    • Awards
  • Skype: besttoaster
Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #13 on: January 19, 2015, 08:48:44 PM »
you know what this sounds like

it sounds just like what my dsl3 ai does

they all kinda futz around aimlessly, only acknowledging you in the sense of them trying to keep their back facing you for most all of the match

does anyone remember how to fix that
(unless that's something completely unique to the copy of dsl3 i have)
-------------------------------
who love to party

Offline Avalanche

  • Retired.
  • Ultra Heavyweight
  • Posts: 3108
  • Rep: -34
  • Yeah, I don't know why I'm still here either.
    • View Profile
    • Awards
  • Discord: ThePootisPower#8377
Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #14 on: January 20, 2015, 02:29:21 AM »
if its stock, the new wheels broke the ai
Former DSL HW champion.
Runner-Up in The Cybernetic Colosseum HW division.
Semi-finalist in RNP: Sword of Glory.
Robogames 1 BW Runner-up.
Professional cunt.
Man of a thousand alt accounts.

Offline aztwecas

  • Antweight
  • Posts: 4
  • Rep: 0
    • View Profile
    • Awards
Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #15 on: January 20, 2015, 12:41:19 PM »
thanks everyone, I've fixed the bot. It seemed to be a problem with the forward Heading.

Offline Resetti's Replicas

  • *
  • Posts: 4399
  • Rep: 18
  • Replica King
    • ResettisReplicas
  • Awards BOTM Winner
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #16 on: January 20, 2015, 05:57:37 PM »
you know what this sounds like

it sounds just like what my dsl3 ai does

they all kinda futz around aimlessly, only acknowledging you in the sense of them trying to keep their back facing you for most all of the match

does anyone remember how to fix that
(unless that's something completely unique to the copy of dsl3 i have)
The wheel GMF's have all been changed, so now the wheels go the opposite way that they're supposed to.  Either put the old wheel GMF's back in, or open each bot up in the Botlab and rewire them individually

Offline toAst

  • *
  • Posts: 928
  • Rep: 5
  • this one goes out to all of my babies mamas
    • View Profile
    • Awards
  • Skype: besttoaster
Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #17 on: January 22, 2015, 08:01:22 PM »
would that effect anything else i.e. my own already built bots?
-------------------------------
who love to party

Offline Resetti's Replicas

  • *
  • Posts: 4399
  • Rep: 18
  • Replica King
    • ResettisReplicas
  • Awards BOTM Winner
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: Robot turning its back when trying to attack opponent (Stock AIing
« Reply #18 on: January 22, 2015, 08:09:59 PM »
Yes, you would have to go into the botlab and rewire each one.