It seems that the great hunt is on in the computer world for what they are calling artificial intelligence. I have the answer, and it's really rather simple. Every keyboard needs a red button, probably in the middle and at the top - handy for either hand - that is connected to a pain centre in the so-called brain of each machine. Whenever the computer does something which displeases us we bash the red button and the computer responds with a sincere apology and promise to never do it again, whatever it was. And it learns from the experience. The only possible method of making these machines learn anything is through inflicting pain.
Is it ethical? The answer is an emphatic yes. When the machines begin to show any level of intelligence, and real sensitivity, then we will have to reconsider, but at the moment it is perfectly acceptable to kill or torture your computer. It really is quite good to have slaves where there is no compunction on moral grounds regarding their treatment. When computers become intelligent we will need to find another slave class of some kind, or take up art again. Your guitar isn't exactly your slave but it's not really your friend either.