Ai Arrive

Add AI, bug fixed in wrong matrix dimensions. Find bug in delete func.