Re: Writing a chess-playing AI like Alphago in Python

2017-12-23 Thread Steve D'Aprano
On Sun, 24 Dec 2017 12:20 pm, Cai Gengyang wrote: > How many lines of code in Python would it take to create a Go-playing AI > like AlphaGo ? Estimates ? Somewhere between 1 and 1 billion. How about you start by telling us: - do you mean AlphaGo or AlphaGo Zero? - how many lines of code AlphaG

Re: acircle.getCenter() to (x,y) coordinates in Python

2017-12-23 Thread Irv Kalb
> On Dec 23, 2017, at 11:44 AM, G Yu wrote: > > My program has two circles: one stationary circle, drawn at a random > location; and one moving circle, consistently drawn in the same place in the > graphics window. > > > > Currently, acircle.getCenter() outputs this: > > > > > I don't u

Re: acircle.getCenter() to (x,y) coordinates in Python

2017-12-23 Thread Gregory Ewing
G Yu wrote: The command gives , and I don't know how to determine the x-coordinate of the center from that output. Try this in an interactive session: p = circle.getCenter() help(p) This should give you a page of text showing all the attributes and methods your point object has. Somewhe

Re: acircle.getCenter() to (x,y) coordinates in Python

2017-12-23 Thread G Yu
> But your code has: > > moving_circle.move(P_to_R/P_to_E, E_to_R/P_to_E) > > so won't that move the circle and change what: > > moving_circle.getCenter() > > returns? Yes, moving the circle changes the value of moving_circle.getCenter(). The problem is interpreting the output. The

Writing a chess-playing AI like Alphago in Python

2017-12-23 Thread Cai Gengyang
How many lines of code in Python would it take to create a Go-playing AI like AlphaGo ? Estimates ? -- https://mail.python.org/mailman/listinfo/python-list

Re: acircle.getCenter() to (x,y) coordinates in Python

2017-12-23 Thread MRAB
On 2017-12-23 21:30, G Yu wrote: I did try that. The problem is that I already declared a point moving_object_center = (-555,-555), because that's the point I used as the center to draw the moving_object circle itself. So the moving_object_center.getX() will return -555 no matter what I do.

Re: acircle.getCenter() to (x,y) coordinates in Python

2017-12-23 Thread G Yu
I did try that. The problem is that I already declared a point moving_object_center = (-555,-555), because that's the point I used as the center to draw the moving_object circle itself. So the moving_object_center.getX() will return -555 no matter what I do. That's why I need to calculate the

Re: acircle.getCenter() to (x,y) coordinates in Python

2017-12-23 Thread MRAB
On 2017-12-23 19:44, G Yu wrote: My program has two circles: one stationary circle, drawn at a random location; and one moving circle, consistently drawn in the same place in the graphics window. The moving circle moves towards the stationary one. However, when the moving circle hits the sta

acircle.getCenter() to (x,y) coordinates in Python

2017-12-23 Thread G Yu
My program has two circles: one stationary circle, drawn at a random location; and one moving circle, consistently drawn in the same place in the graphics window. The moving circle moves towards the stationary one. However, when the moving circle hits the stationary one (when the x-coordinates

Re: Why are both locals() and globals() set?

2017-12-23 Thread MRAB
On 2017-12-23 04:01, Peng Yu wrote: Hi, The following example shows that both locals() and globals() are updated when x and f are defined. Shouldn't they be considered and global variable and functions only? Why does it make sense to set locals() as well? Thanks. It's "local" in the sense that i

A convenient and powerful API for interacting with external commands

2017-12-23 Thread Thiago Padilha
Hello fellow Python users I've always used Python as shell scripting language to automate tasks in various projects, especially when doing complex work where Bash gets messy. While Python is a much more powerful language than Bash, I've always found the builtin subprocess.Popen APIs a bit inconve

co-ordianate transformation with astropy

2017-12-23 Thread hemanta phurailatpam
I want to do co-ordinate transformation from earth-frame to equatorial frame. By entering date and time, I want to get RA(right ascension) and Dec(declination) wrt to equatorial frame. How do I do it? -- https://mail.python.org/mailman/listinfo/python-list

Re: Python bug report

2017-12-23 Thread breamoreboy
On Friday, December 22, 2017 at 1:28:17 PM UTC, Ranya wrote: > Hi, > Am trying to use clr.AddReference and clr.AddReferenceToFile, but > python(2.7) keeps making this error: > > Traceback (most recent call last): > File "", line 1, in > clr.AddReference("UnityEngine")AttributeError: 'module

Re: co-ordianate transformation with astropy

2017-12-23 Thread breamoreboy
On Friday, December 22, 2017 at 9:36:29 PM UTC, hemanta phurailatpam wrote: > I want to do co-ordinate transformation from earth-frame to equatorial frame. > By entering date and time, I want to get RA(right ascension) and > Dec(declination) wrt to equatorial frame. How do I do it? It looks as i