Is a knock sensor the same as an af sensor?

No, it is not a knock sensor at all. An AF (Air/Fuel Ratio) sensor is also know as a wide range oxygen sensor. It is the newer type oxygen sensor.