Some Opening Principles and Chess Strategies

Quick List of Chess Strategies:
*  Avoid Moving a Chess Piece Twice During the Opening is a good chess strategy.
*  It is Better Chess Strategy to Develop the Knights before Their Respective Bishops.
*  A good chess strategy is to Develop Both Knights before the Queen or Bishop.
*  A good chess strategy is Do Not Develop your Chess Pieces Exclusively on One Side.
*  A good chess strategy is as a Rule Do Not Play a Piece beyond Your Own Side of the Board in the Opening.
*  A good chess strategy is if You Have Castled Do Not Permit the Opponent to Open a File on Your King.
*  A good chess strategy is to Avoid Pinning the Opponent’s King’s Knight before He has Castled, Especially When You Have Yourself  Castled on the Kingside.
*  A good chess strategy is to Avoid Making Exchanges which Develop Another Piece for the Opponent.
*  A good chess strategy is to Avoid Exchanging Bishops for Knights Early in the Game.
*  A good chess strategy is to Avoid Premature Attacks.

Continue reading “Some Opening Principles and Chess Strategies”

Python: write a function to create an image of a circle

I’m having a lot of difficulty figuring out the logic behind assignment 6.3.

I’m attempting to visualize the solution as a grid. I generate a list within a list to contain the information I will later use to code an image.
For example, if the radius is 3, the off states would look like this:
[0, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, 0]
[0, 0, 0, 0, 0, 0, 0]

With the intention of turning on the corresponding pixels to the circle function I am to create:
[0, 0, 0, 1, 0, 0, 0] 
[0, 0, 1, 0, 1, 0, 0]
[0, 1, 0, 0, 0, 1, 0]
[1, 0, 0, 0, 0, 0, 1]
[0, 1, 0, 0, 0, 1, 0]
[0, 0, 1, 0, 1, 0, 0]
[0, 0, 0, 1, 0, 0, 0]

Obviously, a radius 3 circle is not going to look very defined, this was just a demonstration. I then intend to parse through each row and use the setPixel() function to activate the pixel in an EmptyImage object.

My trouble is figuring out how to get my function to encode the map of pixels..

I think I am doing this in a much more complicated manner than intended. Any advice?

Code thus far:

from cImage import *
from math import pi

radius   = 3
diameter = radius*2
pixel = Pixel(80,80,80)  # grey pixel

column    = []
for i in range(0, diameter+1): #allow for an odd number of columns


map = []
for i in range(0, diameter+1): #allow for an odd number of columns


for i in map:

# All this spits out is the circumference, stuck here.
def myCircle(thisRadius):
circumference = 2 * pi * thisRadius
return int(circumference)


#win    = ImageWin(“circ”, diameter, diameter)
#cirImg = EmptyImage(diameter, diameter)

Motorola SB6121 requires power cycle to properly function

After doing some research, bought the Motorola SB6121 cable modem to use with my time warner service. Installation crew came to set up the cable line, etc, and used my laptop to activate the service (connecting laptop to cable modem via cat5).

Bought the Netgear WNDR3300 to use as a wireless router for my home network. After connecting the router and modem, I kept encountering the same issue: wireless bars with a yellow triangle (windows) on the network connectivity display. After mucking about in the configuration options for the Netgear router, I did some google browsing to find this thread:


What I didn’t find in any instruction is that the cable modem needs to power cycle, and when it does that, it changes what device gets provided service. The cable modem was left on the whole time while I was power cycling the Netgear router. The other laptop I used to test connectivity wouldn’t get signal at all either.