• SmartGoat

    @cvp I just wanted to test action.group, not especially do an action.sequence. It is just strange that if the two actions are running simultaneously and they theorically negate themselves, why wouldn't the character stay in place ?

    posted in Pythonista read more
  • SmartGoat

    @JonB First, thanks for answering me.
    Second, Crap ! It's much less usable than i thought. So there isn't any way to know if a given Node is executing an action ?
    Cordially,
    SmartGoat

    posted in Pythonista read more
  • SmartGoat

    Hi everyone,
    Today i was doing some tests on scene.Action capabilities, but I sruggled with two weirds behaviours of actions:

    1. Node.paused boolean does not seems to be locked in 'false' state, not changing when executing an action or not; however it is also possible that I didn't understood this attribute. testing code...
    from scene import *
    
    class Main(Scene):
            def setup(self):
                    self.background_color = '#cdcdcd'
                    self.char = SpriteNode('plf:AlienBlue_stand', x_scale = 3, y_scale =3)
                    self.char.position = (512,384)
                    self.add_child(self.char)
                    print(self.char.paused, 'a')
                    self.char.run_action(Action.move_by(0,-100,1.0))
                    print(self.char.paused, 'b')
    
    run(Main())
    

    ...which would presumably give us a False then a True. but we get two 'False'. Try it by yourself and tell me if you get others results !

    1. When I use a Action.group of two Actions which would negate themselves, only the second one is taken into account; testing code...
    class Main(Scene):
            def setup(self):
                    self.background_color = '#cdcdcd'
                    self.char = SpriteNode('plf:AlienBlue_stand', x_scale = 3, y_scale =3)
                    self.char.position = (512,384)
                    self.add_child(self.char)
            
            def touch_began(self,touch):
                    action_group = Action.group(Action.move_by(0,100),Action.move_by(0,-100))
                    if not self.char.paused:
                            self.char.run_action(action_group)
    
    run(Main())
    

    ... and for output I let you try it by yourself too. Have a nice day/night,
    Thanks in advance,
    SmartGoat

    posted in Pythonista read more
  • SmartGoat

    @biob I already done multiple Deep Learning experiences with Pythonista (numpy), I can show you some of them if you want to see how it works, just mp me !

    posted in Pythonista read more
  • SmartGoat

    @hmartin I can’t participate because of my level sadly but keep up the good work, it is so nice to see such persons like you who help the community with their projects ! Good luck man !

    posted in Pythonista read more
  • SmartGoat

    @ELECTRO8888 would love to see how your game looks, I kept my project in mind but don’t have actually the energy to start it, and i’m really interested in how you’ll do it

    posted in Pythonista read more
  • SmartGoat

    @JonB what ?? Tensorflow can work on Pythonista ? How did you manage to make it working ? I tried with stash but C-based modules were needed....

    posted in Pythonista read more
  • SmartGoat

    @jgoalby I love you, you found indirectly the error ^^ sometimes the difference in Y axis divided by difference in X axis between two objects was exactly 1, and I didn’t take this case in account in my vision_cut() function, so now i’ve made a little change and it’s now fixed ! Thank you so much for your help, and have a nice day / night !
    @JonB thank you for helping me, but the bug is already fixed, I hope it doesn’t annoy you ^^ good night !

    posted in Pythonista read more
  • SmartGoat

    Hi everyone, today I’m posting this because I get the most strange bug of my Pythonista experience. I was experiencing with neural networks made from scratch (in fact, behaviour of raptor VS sheep) and I get an amazingly simple TypeError in my main.py file (l.131):

    Traceback (most recent call last):
    File "/var/containers/Bundle/Application/2BCE66D1-3EB5-46DC-AFEE-F33C73B6BB37/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/scene.py", line 199, in _draw
    self.update()
    File "/private/var/mobile/Containers/Shared/AppGroup/D48F6FDD-3F34-40EB-9497-17B2560BB120/Pythonista3/Documents/Neural Networks/RAPTOR-MOUTON/main.py", line 232, in update input = self.get_input(agent) File "/private/var/mobile/Containers/Shared/AppGroup/D48F6FDD-3F34-40EB-9497-17B2560BB120/Pythonista3/Documents/Neural Networks/RAPTOR-MOUTON/main.py", line 131, in get_input obj.position[0], obj.position[1])
    TypeError: 'NoneType' object is not iterable
    

    I get a NoneType object in a list, but I tried to debunk it in every way without seeing a single “None”..... I’m despaired...
    I tried one hundred times to resolve this, but even when I check before execution If BOTH positions (of f.vision_cut() args - > l.130) aren’t NoneType objects, I get the same error. Here is below the link of my project, with images and others scripts included in the project. Please just try and see how weird it is.
    https://www.dropbox.com/sh/ryf9tk90b1vtu38/AADJ_Xu6UIDstZJc6HEJ6RCxa?dl=0

    Thanks in advance for every answer !
    Cordially,
    SmartGoat

    P.S: I don’t have included comments, tell it to me if you absolutely need them to solve the bug, and I’ll make commented versions of my code. Have a nice day/night !

    posted in Pythonista read more
  • SmartGoat

    hey everyone, I'm wondering if it is possible to install pytorch in pythonista cause the only dependencies are respectively numpy (already in pythonista) and pillow which, as i read, is pure python.
    To install pytorch, you need to install 2 modules: torchvision and torch. Torchvision install itself without problems, but torch isn't found in pip stash:

    [~/Documents]$ pip install torch
    Querying PyPI ... 
    Error: Source distribution not available for torch: 1.0.0
    

    which is strange because this is the command given by the official site for installing it on MacOS.
    Also, I can't install Pillow because of this other error:

    [~/Documents]$ pip install pillow
    Querying PyPI ... 
    Downloading package ...
    Opening: https://files.pythonhosted.org/packages/f7/d6/00368fe7f9acb9454ba5a75a1edda97b7ee9cfe399af4acb6489466be37e/Pillow-5.4.0.tar.gz
    
    Save as: /private/var/mobile/Containers/Data/Application/89F819E6-6ADB-4FBD-B2AC-889B8BDFCBA3/tmp//Pillow-5.4.0.tar.gz (15929265 bytes)
      15929265  [100.00%]
    Extracting archive file ...
    Archive extracted.
    Running setup file ...
    TypeError("unsupported operand type(s) for +: 'OmniClass' and 'list'",)
    Failed to run setup.py
    Fall back to directory guessing ...
    Error: Cannot locate packages. Manual installation required.
    

    Does anyone have an idea ? it would be really interesting to dive in cause pytorch seems to be the only package which can provide high level deep learning/data science with pure python....
    Thanks in advance for help !

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!