How to play Masyu

Make a single loop with lines passing through the centers of cells, horizontally or vertically. The loop never crosses itself, branches off, or goes through the same cell twice.

Lines must pass through all cells with black and white circles.

Lines passing through white circles must pass straight through its cell, and make a rightangled turn in at least one of the cells next to the white circle.

Lines passing through black circles must make a rightangled turn in its cell, then it must go straight through the next cell (till the middle of the second cell) on both sides.
Solution methods
Understanding the nuances of the circles and how they interact with each other is the key to solving a Masyu puzzle. Generally speaking, it is easiest to start along the outside border of the grid and work inwards. Here are some basic scenarios where portions of the loop can be determined:
 Any segment travelling from a black circle must travel two cells in that direction without intersecting another part of the loop or the outer border; each black cell must have two such segments at a right angle. The logical combination of those two statements is that if a segment from a black cell cannot be drawn in some orthogonal direction, a segment in the opposite direction must be drawn. For example, if one cannot legally travel up two cells from a black circle, then the loop must travel down from that black circle for two cells. This has two common results:
 Any black circle along the outer border or one cell from the outer border must have a segment leading away from the border (and those sufficiently near a corner must lead from both walls, defining the loop's path through the circle);
 Orthogonally adjacent black circles must have segments travelling away from each other.
 Black circles that are orthogonally next to the end of the loop that does not travel towards it must have the loop heading away from the other loop segment.
 White circles along the outer border obviously need the loop to travel through them parallel to the border; if two white circles along a border are adjacent or are one cell apart, then the loop will need to turn away from the border just beyond the circles.
 If three or more white circles are orthogonally contiguous and collinear, then the loop will need to pass through each of those circles perpendicular to the line of circles.
 If two white circles are orthogonally contiguous and a cell on either end has a loop segment entering parallel to the line of the circles, then the loop will need to pass through each of those circles perpendicular to their line. (Otherwise, the line through them would connect to the adjacent segment and one of the white cells would not be next to a turn in the loop.)
 A black circle with two white circles diagonally adjacent on the same side must have the loop heading away from that side. If not, and it went between the white circles instead, then the white circles would be parallel to that section of the loop, and make it impossible to complete the black circle.
 Black circles with three white circles diagonally adjacent can be fully completed by this rule.
 If the diagram is cut virtually into two pieces, the loop must cross the cutting line an even number of times. This is due to the Jordan Curve Theorem.
As in other loopconstruction puzzles, "short circuits" also need to be avoided: as the solution must consist of a single loop, any segment that would close a loop is forbidden unless it immediately yields the solution to the entire puzzle.
Like many other combinatory and logic puzzles, Masyu can be very difficult to solve; solving Masyu on arbitrarily large grids is an NPcomplete problem. However, published instances of puzzles have generally been constructed in such a way that they can be solved in a reasonable amount of time.