Implementing a neural network: low accuracy
It seems like you just got a bug @ your parse_data. (see my comment: replace X[idx][int(s[7])+j] = 1.0 # a6 to X[i][int(s[7])+j] = 1.0 # a6).

I altered the parameters. You will see that they have a big influence. I guess this problem is easily stuck on a local minima.

Could you run my code please (Only difference is that it is python 3, but should run on python 2)

This is the link of the data saved in data1.txt:
http://mlearn.ics.uci.edu/databases/monks-problems/monks-2.test

import numpy as np
    import os
    import matplotlib.pyplot as plt

abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
os.chdir(dname)

# paramaters
eta = 0.05
hidden_dim = 2
alpha = 0.8
reg_lambda = 0.0
epochs = 100

file = 'data1.txt'

input_dim = 17
output_dim = 1

# read and parse MONK data
def parse_data(text):
    with open(text) as f:
        content = f.readlines()
    t = np.zeros((len(content), output_dim))
    X = np.zeros((len(content), input_dim))
    for i,val in enumerate(content):
        s = val.split(" ")
        t[i] = float(s[1])
        # for idx in range(17):
        #   X[i][idx] = 0.0
        j = -1
        # |0 |1 |2 |3 |4 |5 |6 |7 |8 |9 |10|11|12|13|14|15|16
        # |a1|a1|a1|a2|a2|a2|a3|a3|a4|a4|a4|a5|a5|a5|a5|a6|a6
        X[i][int(s[2])+j] = 1.0 # a1
        j = 2
        X[i][int(s[3])+j] = 1.0 # a2
        j = 5
        X[i][int(s[4])+j] = 1.0 # a3
        j = 7
        X[i][int(s[5])+j] = 1.0 # a4
        j = 10
        X[i][int(s[6])+j] = 1.0 # a5
        j = 14
        X[i][int(s[7])+j] = 1.0 # a6

    return (X, t)

X, t = parse_data(file)

print(np.sum(t)/len(t))

def sigmoid(x):
    output = 1/(1+np.exp(-x))
    return output

def sigmoid_output_to_derivative(output):
    return output*(1-output)

# initialize weights
seed = 1
np.random.seed(seed)
W0 = np.random.normal(0, 1/input_dim, size = (input_dim,hidden_dim))
W1 = np.random.normal(0, 1/hidden_dim, size = (hidden_dim,output_dim))
b0 = np.zeros((1, hidden_dim))
b1 = np.zeros((1, output_dim))
dW0 = 0
dW1 = 0


error_list = []
for j in range(epochs):
    # forward propagation
    l0 = X
    l1 = sigmoid(np.dot(l0,W0) + b0)
    l2 = sigmoid(np.dot(l1,W1) + b1)

    # back propagation
    l2_error = l2 - t
    l2_delta = l2_error*sigmoid_output_to_derivative(l2)

    l1_error = l2_delta.dot(W1.T)
    l1_delta = l1_error*sigmoid_output_to_derivative(l1)

    error = np.mean(np.square(l2_error))
    error_list.append(error)
    if (j% 20) == 0:
        print("Training error after", j, "iterations:",error)

    dW1 = -eta * (l1.T.dot(l2_delta) + reg_lambda * W1) + alpha * dW1
    dW0 = -eta * (l0.T.dot(l1_delta) + reg_lambda * W0) + alpha * dW0
    db1 = -eta*(np.sum(l2_delta, axis=0))
    db0 = -eta*(np.sum(l1_delta, axis=0))

    W1 += dW1
    W0 += dW0
    b1 += db1
    b0 += db0

plt.plot(error_list)
plt.show()